| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add ``consider-using-f-string`` checker
This adds a checker for normal strings which are formatted
with ``.format()`` or '%'.
The message is a convention to nudge users towards using f-strings.
This closes #3592
* Update pylint code to use f-strings
After adding `consider-using-f-strings` the codebase showed numerous
cases of formatting which could be f-strings.
This commit changes most of these to become f-strings, or adds ignores.
* Apply suggestions from code review
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Use alias for astroid nodes 04
* Resolve name conflicts
* Apply suggestions from code review
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pyreverse - Handle a regression with typehints of type astroid.Subscript
Closes #4845
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* pyreverse - Handle a regression with typehints of type astroid.Subscript
- Add test-case to pyreverse data files
Closes #4845
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(#4731)
* Create common ``Printer`` base class for Pyreverse, and improve typing.
* Use ``abc.ABC`` as metaclass for ``Printer`` instead of raising ``NotImplementedError``
* Rename ``vcgutils.py`` to ``vcg_printer.py``
|
|
|
|
|
|
|
| |
* Pyreverse - Show class has-a relationships inferred from type-hints
Closes #4744
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add unspecified-encoding checker #3826
This adds an unspecified-encoding checker that adds a warning
whenever open() is called without an explicit encoding argument.
This closes #3826
* Update tests to conform to unspecified-encoding
With addition of the unspecified-encoding checker calls of open()
need an encoding argument.
Where necessary this argument has been added, or the message has been
disabled.
This also includes small linting changes to a small number
of tests. Their test-data has been updated to reflect new line numbers.
* Update scripts to conform to unspecified-encoding
With addition of the unspecified-encoding checker calls of open()
need an encoding argument.
Where necessary this argument has been added.
* Update pylint to conform to unspecified-encoding
With addition of the unspecified-encoding checker calls of open()
need an encoding argument.
Where necessary this argument has been added.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
|
|
|
| |
* Fix link in license header
* Update link to astroid bump_changelog
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add type annotations to pyreverse dot files
Closes #1548
- Indicate the attribute is optional in the dot files by
inspecting the default value.
- Handle the Subscript type annotations
- Refactor & move the logic to obtain annotations to utils.py as
re-usable functions
- Add unittests for the added functions
- Add a try/except to deal with a possible InferenceError when using
NodeNG.infer method
- Create a function in utils and so remove repeated logic in inspector.py
- Add unittests to check the InferenceError logic
- Adjust the types in function input
|
| |
|
|
|
|
| |
* Emit ``consider-using-with`` also if calls like ``open()`` are used without an assignment
|
| |
|
| |
|
| |
|
|
|
|
| |
Fix issue #3811
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using configuration:
```yaml
- repo: https://github.com/asottile/pyupgrade
rev: v2.1.0
hooks:
- id: pyupgrade
args: [--py3-plus, --keep-percent-format]
exclude: ^tests/(extensions/data/|functional/|input/|regrtest_data/)
```
|
|
|
|
|
|
|
| |
non-ascii-name check
Non-ASCII characters are now allowed by ``invalid-name`` check.
Also this commit adds a new check ``non-ascii-name``, which is used
to detect identifiers with non-ASCII characters.
|
|
|
|
| |
We no longer support Python 2 so we can remove
the compatibility code we had in place for that version.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
methods. (#1641)
Close #1267
|
| |
|
|
|
|
|
| |
This was changed automatically in #894, but apparently
we need to have the copyright notice somewhere.
|
| |
|
|
|
|
| |
into __dict__.
|
|
|
|
|
|
| |
We moved pyreverse.inspector.Project, pyreverse.inspector.project_from_files
and pyreverse.inspector.interfaces. These were moved since they didn't belong in astroid
and they can be better maintained inside pyreverse itself.
|
| |
|
|
|