Skip to content

Commit

Permalink
Upgrade version to use python 3.11 and pylint to 2.15.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Oct 12, 2022
1 parent ce1f88d commit ab125dc
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

env:
CACHE_VERSION: 4
DEFAULT_PYTHON: 3.9
DEFAULT_PYTHON: 3.10
PRE_COMMIT_CACHE: ~/.cache/pre-commit

jobs:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11-dev"]
steps:
- uses: actions/checkout@v2
- name: Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- published

env:
DEFAULT_PYTHON: 3.9
DEFAULT_PYTHON: 3.10

jobs:
release-pypi:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==21.9b0]
additional_dependencies: [black==22.10.0]
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
Expand Down
1 change: 0 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ disable=
missing-docstring, # Sometime it is self explanatory
wrong-import-order, # Handled by isort
ungrouped-imports, # Handled by isort
no-self-use, # literally a convention that do not change anything
too-few-public-methods, # Lot of classes can validly have only one method
too-many-instance-attributes, # Too much work
too-many-locals, # Too much work
Expand Down
1 change: 1 addition & 0 deletions centralized_pre_commit_conf/constants.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import enum

APPLICATION_NAME = "pre-commit-conf"
TIMEOUT = 10.0


class ExitCode(enum.Enum):
Expand Down
5 changes: 3 additions & 2 deletions centralized_pre_commit_conf/download_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import requests
from urllib3.exceptions import InsecureRequestWarning

from centralized_pre_commit_conf.constants import TIMEOUT
from centralized_pre_commit_conf.parse_args import get_url_from_args
from centralized_pre_commit_conf.prints import error, info, success, warn

Expand Down Expand Up @@ -113,9 +114,9 @@ def display_results(results: Dict[str, Result]) -> None:
def recover_new_content(config_file_url: str, insecure: bool) -> requests.Response:
with warnings.catch_warnings(record=True) as messages:
if insecure:
result = requests.get(config_file_url, verify=False)
result = requests.get(config_file_url, verify=False, timeout=TIMEOUT)
else:
result = requests.get(config_file_url)
result = requests.get(config_file_url, timeout=TIMEOUT)
for msg in messages:
if not insecure or msg.category is not InsecureRequestWarning:
warn(msg.message)
Expand Down
7 changes: 4 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ author_email = [email protected]
long_description = file: README.md
long_description_content_type = text/markdown
name = centralized-pre-commit-conf
version = 0.5.0
version = 0.6.0
description = Easily install and update centralized pre-commit hooks and their configuration files in decentralized repositories
classifiers =
Operating System :: OS Independent
Expand All @@ -14,6 +14,7 @@ classifiers =
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Development Status :: 5 - Production/Stable
url = https://github.com/Pierre-Sassoulas/centralized-pre-commit-conf

Expand All @@ -34,7 +35,7 @@ tests_require =
python-coveralls
coverage
coveralls
pylint==2.12.2
pylint==2.15.4
zip_safe = True

[options.entry_points]
Expand All @@ -48,7 +49,7 @@ test =
coverage
python-coveralls
coveralls
pylint==2.12.2
pylint==2.15.4

[options.package_data]
centralized_pre_commit_conf =
Expand Down

0 comments on commit ab125dc

Please sign in to comment.