Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pep8-naming compatibility with flake8 #210

Merged
merged 9 commits into from Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions run_tests.py
Expand Up @@ -72,10 +72,17 @@ def load_tests(lines):

def parse_options(checker, options):
"""Parse the CLI-style flags from `options` and expose to `checker`"""
extra_kwargs = {}
if int(flake8.__version__.split('.')) >= 6:
jparise marked this conversation as resolved.
Show resolved Hide resolved
extra_kwargs = {
"formatter_names": []
}

options_manager = OptionManager(
version=flake8.__version__,
plugin_versions=f"naming: {pep8ext_naming.__version__}",
parents=[],
**extra_kwargs,
)
options_manager.add_option('--select', default=[])
options_manager.add_option('--extended-default-select', default=['N'])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -42,7 +42,7 @@ def run_tests(self):
license='Expat license',
package_dir={'': 'src'},
py_modules=['pep8ext_naming'],
install_requires=['flake8>=3.9.1'],
stdedos marked this conversation as resolved.
Show resolved Hide resolved
install_requires=['flake8>=5.0.0'],
zip_safe=False,
python_requires='>=3.7',
entry_points={
Expand Down
11 changes: 9 additions & 2 deletions tox.ini
@@ -1,5 +1,11 @@
[tox]
envlist = py37,py38,py39,py310,py310-flake8,pypy3
envlist =
py37-flake85,
py38-flake8{5,6},
py39-flake8{5,6},
py310-flake8{5,6},
py310-flake8,
pypy3

[gh-actions]
python =
Expand All @@ -12,7 +18,8 @@ python =
[testenv]
commands = python run_tests.py
deps =
flake8 >= 5.0.0
flake85: flake8 >= 5.0.0, < 6.0.0
flake86: flake8 >= 6.0.0, < 7.0.0
jparise marked this conversation as resolved.
Show resolved Hide resolved
jparise marked this conversation as resolved.
Show resolved Hide resolved

[testenv:py310-flake8]
basepython = python3.10
Expand Down