| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Refs #8404
|
|
|
|
|
|
|
|
|
|
| |
* Ignore subclasses of Any
* Add ignores for imported code and remove casts
* Add disables for uninferable return values
* Turn on ``mypy`` strict mode
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
syntax (#6720)
* Fix `pyreverse` type annotations for attributes using alternative union syntax.
* Fix `dot` output and add additional test cases
* Apply suggestions from code review
* Add changelog entry in `full.rst`
|
|
|
|
|
| |
* Remove unnecessary base class and dead code
* Add ChangeLog and whatsnew entry
|
|
|
| |
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fix the existing file so they have a notice.
No header for setup.py or examples or doc
|
|
|
|
|
|
| |
git is the source of truth for the copyright, copyrite (the tool)
was taking exponentially longer with each release, and it's
polluting the code with sometime as much as 50 lines of names.
|
|
|
|
|
| |
* Pyreverse: better error messages for unsupported file formats
* Apply suggestions from code review.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 21.12b0 → 22.1.0](https://github.com/psf/black/compare/21.12b0...22.1.0)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
| |
Closes #5250
|
|
|
|
|
|
|
|
|
|
|
| |
* [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v2.26.0 → v2.28.0](https://github.com/asottile/pyupgrade/compare/v2.26.0...v2.28.0)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|