-
Notifications
You must be signed in to change notification settings - Fork 46
Introduce lint #289
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
Merged
Merged
Introduce lint #289
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See [1]. 1. https://pypi.org/project/pylint/ Part of #270
Part of #270
Fix all cases of C0303 trailing-whitespace. Remove trailing whitespaces from documentation as well. Part of #270
Fix several cases of C0103 invalid-name. Part of #270
`t` sounds like a reasonable variable names in tests, `ok` sounds like a reasonable variable names in general. This patch disables C0103 invalid-name check for them. Part of #270
`tz` is a part of the Datetime public API and we don't plan to change it now. Part of #270
unittest methods use CamelCase for its asserts. We use it here for our custom assert too. Part of #270
Lowercase constants are the part of dbapi, we cannot rename them. Part of #270
Lowercase constants are the part of sphinx API, we cannot rename them. Part of #270
Fix all cases of C0121 singleton-comparison. Part of #270
Fix all cases of C0209 consider-using-f-string. Part of #270
Fix all cases of C0206 consider-using-dict-items. Part of #270
Fix all cases of C0200 consider-using-enumerate. Part of #270
Fix all cases of C0201 consider-iterating-dictionary. Part of #270
Fix all cases of C0202 bad-classmethod-argument. Part of #270
Fix all cases of C0325 superfluous-parens. Part of #270
Fix all cases of C0321 multiple-statements. Part of #270
Fix all cases of C0305 trailing-newlines. Part of #270
Disable all current cases of C0302 too-many-lines. Part of #270
Fix all cases of C0411 wrong-import-order. Part of #270
Fix all cases of C0413 wrong-import-position. Part of #270
Fix the only case of C0415 import-outside-toplevel. Part of #270
Disable a case of C0415 import-outside-toplevel and possible E0401 import-error: we allow to run commands like `python setup.py test` without setuptools_scm. Part of #270
Fix all cases of C0114 missing-module-docstring. Part of #270
Use Dataclass for protocol Greeting, as it should be. Extract the definition outside the function. Part of #270
Use Enum for preplication JoinState, as it should be. Extract the definition outside the function. 1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/iproto/replication/#box-protocol-join Part of #270
Fix several cases of C0115 missing-class-docstring. Part of #270
Fix several cases of C0116 missing-function-docstring. Part of #270
Disable remaining cases of C0115 missing-class-docstring for unittest classes. Part of #270
Ignore E501 line too long since it's already checked with pylint. It seems impossible to transfer its rules like "skip docstring links and tables by regexp", so we just skip it here. Part of #270
Ignore all cases of E265 block comment should start with '# ' in documentation configuration template. Part of #270
W503 is an outdated warning which contradicts modern W504 [1]. 1. https://www.flake8rules.com/rules/W503.html Part of #270
Fix several cases of F841 local variable is assigned to but never used. Part of #270
This patch includes fixes for all remaining cases of - E101 indentation contains mixed spaces and tabs, - E121 continuation line under-indented for hanging indent, - E122 continuation line missing indentation or outdented, - E123 closing bracket does not match indentation of opening bracket's line, - E124 closing bracket does not match visual indentation, - E126 continuation line over-indented for hanging indent, - E127 continuation line over-indented for visual indent, - E128 continuation line under-indented for visual indent, - E131 continuation line unaligned for hanging indent, - E201 whitespace after '(', - E202 whitespace before '(', - E203 Whitespace before ':', - E221 multiple spaces before operator, - E225 missing whitespace around operator, - E226 missing whitespace around arithmetic operator, - E227 missing whitespace around bitwise or shift, operator, - E231 missing whitespace after ',', ';', or ':', - E241 multiple spaces after ',', - E251 unexpected spaces around keyword / parameter equals, - E252 missing whitespace around parameter equals, - E261 at least two spaces before inline comment, - E275 missing whitespace after keyword, - E301 expected 1 blank line, - E302 expected 2 blank lines, - E303 too many blank lines, - E305 expected 2 blank lines after class or function definition, - E306 expected 1 blank line before a nested definition, - E502 the backslash is redundant between brackets, - W191 indentation contains tabs, - W293 blank line contains whitespace, - W504 line break after binary operator. Part of #270
tarantool.error values import are the part of the DBAPI requirements, so they cannot be omitted. The same rule is used in pylint. Part of #270
Fir all remaining cases of F401 unused import. Part of #270
Skip autogenerated timezones since there are too many abbreviations that confuse codespell. Part of #270
9c9bdfc
to
a543fb1
Compare
See [1] about global bad-option-value fail to work. 1. pylint-dev/pylint#3312 Part of #270
a543fb1
to
3df0e27
Compare
3df0e27
to
e6914b0
Compare
2b209b4
to
6913935
Compare
6913935
to
fc4d6e8
Compare
DifferentialOrange
added a commit
to tarantool/doc
that referenced
this pull request
Sep 4, 2023
tarantool-python static analysis was introduced in [1], CRUD API was introduced in [2]. 1. tarantool/tarantool-python#289 2. tarantool/tarantool-python#264
DifferentialOrange
added a commit
to tarantool/doc
that referenced
this pull request
Sep 4, 2023
tarantool-python static analysis was introduced in [1], CRUD API was introduced in [2]. 1. tarantool/tarantool-python#289 2. tarantool/tarantool-python#264
p7nov
pushed a commit
to tarantool/doc
that referenced
this pull request
Oct 10, 2023
* connectors: remove queue-python tarantool/queue-python [1] last commit was in 2016. Module does not support Tarantool 1.6+. 1. https://github.com/tarantool/queue-python * connectors: update aiotarantool status shveenkov/aiotarantool last commit was in 2019. 1. https://github.com/shveenkov/aiotarantool * connectors: remove gtarantool from comparison shveenkov/gtarantool [1] last commit was in 2016. It is useless for modern Tarantool users. 1. https://github.com/shveenkov/gtarantool * connectors: update comparison table tarantool-python static analysis was introduced in [1], CRUD API was introduced in [2]. 1. tarantool/tarantool-python#289 2. tarantool/tarantool-python#264
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce lint with pylint, flake8 and codespell. See commits for more detailed info.
Closes #270