Skip to content

Commit

Permalink
feat: upgrade package
Browse files Browse the repository at this point in the history
  • Loading branch information
YukariChiba authored and deepin-ci-robot committed Sep 5, 2023
1 parent 6783913 commit 5b3692c
Show file tree
Hide file tree
Showing 3,466 changed files with 139,622 additions and 59,409 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*.{py,pyi,rst,md,yml,yaml,toml,json,txt}]
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space

[*.{py,pyi,toml,json}]
indent_size = 4

[*.{yml,yaml}]
indent_size = 2
55 changes: 36 additions & 19 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,26 +1,43 @@
# Some PEP8 deviations are considered irrelevant to stub files:
# E301 expected 1 blank line
# E302 expected 2 blank lines
# E305 expected 2 blank lines
# E701 multiple statements on one line (colon)
# E741 ambiguous variable name
# F401 imported but unused
# F403 import *' used; unable to detect undefined names
# F405 defined from star imports
# F822 undefined name in __all__
# The following rules are incompatible with or enforced by black:
# E203 whitespace before ':' -- scripts only
# E301 expected 1 blank line
# E302 expected 2 blank lines
# E305 expected 2 blank lines
# E501 line too long

# Nice-to-haves ignored for now
# E501 line too long
# Some rules are considered irrelevant to stub files:
# B All flake8-bugbear rules are .py-specific
# E701 multiple statements on one line (colon) -- disallows "..." on the same line
# F401 imported but unused -- does not recognize re-exports
# https://github.com/PyCQA/pyflakes/issues/474
# F822 undefined name in __all__ -- flake8 does not recognize 'foo: Any'
# https://github.com/PyCQA/pyflakes/issues/533

# Rules that are out of the control of stub authors:
# E741 ambiguous variable name
# F403 import *' used; unable to detect undefined names
# F405 defined from star imports

# Rules that we'd like to enable in the future:
# Y037 Use PEP 604 syntax instead of `typing.Union` and `typing.Optional`.
# Currently can't be enabled due to a few lingering bugs in mypy regarding
# PEP 604 type aliases (see #4819).
# NQA102 "noqa" code has no matching violations. We often introduce "noqa" comments
# into the typeshed codebase to unblock flake8-pyi PRs, meaning these comments
# have "no matching violations" since the relevant flake8-pyi checks haven't
# yet been released.

[flake8]
per-file-ignores =
*.py: E203, W503
*.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F822
*.py: E203, E301, E302, E305, E501
*.pyi: B, E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F822, Y037
# Since typing.pyi defines "overload" this is not recognized by flake8 as typing.overload.
# Unfortunately, flake8 does not allow to "noqa" just a specific error inside the file itself.
typing.pyi: E301, E302, E305, E501, E701, E741, F401, F403, F405, F811, F822
# https://github.com/PyCQA/flake8/issues/1079
# F811 redefinition of unused '...'
stdlib/typing.pyi: B, E301, E302, E305, E501, E701, E741, NQA102, F401, F403, F405, F811, F822, Y037
# Generated protobuf files include docstrings
*_pb2.pyi: B, E301, E302, E305, E501, E701, NQA102, Y021, Y026

# We are checking with Python 3 but many of the stubs are Python 2 stubs.
builtins = StandardError,apply,basestring,buffer,cmp,coerce,execfile,file,intern,long,raw_input,reduce,reload,unichr,unicode,xrange
exclude = .venv*,.git,*_pb2.pyi
max-line-length = 130
exclude = .venv*,.git
noqa_require_code = true
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
- repo: https://github.com/hadialqattan/pycln
rev: v2.1.1 # must match requirements-tests.txt
hooks:
- id: pycln
args: [--all, stubs, stdlib, tests, scripts]
- repo: https://github.com/psf/black
rev: 22.10.0 # must match requirements-tests.txt
hooks:
- id: black
language_version: python3.9
- repo: https://github.com/pycqa/isort
rev: 5.10.1 # must match requirements-tests.txt
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pycqa/flake8
rev: 5.0.4 # must match requirements-tests.txt
hooks:
- id: flake8
additional_dependencies:
- 'flake8-bugbear==22.10.27' # must match requirements-tests.txt
- 'flake8-noqa==1.2.9' # must match requirements-tests.txt
- 'flake8-pyi==22.10.0' # must match requirements-tests.txt

ci:
autofix_commit_msg: '[pre-commit.ci] auto fixes from pre-commit.com hooks'
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: weekly
skip: [flake8]
submodules: false
5 changes: 0 additions & 5 deletions CODE_OF_CONDUCT.md

This file was deleted.

Loading

0 comments on commit 5b3692c

Please sign in to comment.