Skip to content
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

Update to python3.11 #249

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"
- name: Install Poetry
uses: abatilo/actions-poetry@v2.1.4
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.1.13
poetry-version: 1.7.1
- name: Setup Poetry
run: |
poetry config virtualenvs.create true
Expand Down Expand Up @@ -51,27 +51,27 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.10"]
python-version: ["3.11"]
include:
- os: macos-latest
python-version: "3.9"
python-version: "3.11"
- os: windows-latest
python-version: "3.8"
python-version: "3.11"
env:
# These environment variables are passed to CodeCov to identify each build
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2.1.4
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.1.13
poetry-version: 1.7.1
- name: Setup Poetry
run: |
poetry config virtualenvs.create true
Expand All @@ -89,7 +89,7 @@ jobs:
macos: poetry run task cover
windows: poetry run task cover-win
- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.11'
- name: Install Poetry
uses: Gr1N/setup-poetry@v7
uses: Gr1N/setup-poetry@v8
- name: Publish
run: |
poetry version ${GITHUB_REF##*/v}
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,4 @@ min-public-methods=2

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
3 changes: 1 addition & 2 deletions gator/checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ def load_check(checker_source, check_file):
"""Load the specified check from the source."""
if is_internal_check(check_file):
return importlib.import_module(checks.__name__ + "." + check_file)
else:
return checker_source.load_plugin(check_file)
return checker_source.load_plugin(check_file)


def get_source(checker_paths=[]):
Expand Down
2 changes: 1 addition & 1 deletion gator/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def set_result(description, outcome, diagnostic):

def get_result():
"""Return the result dictionary."""
# pylint: disable=global-statement
# pylint: disable=global-statement, global-variable-not-assigned
global result
return result

Expand Down
4 changes: 2 additions & 2 deletions gator/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_word_diagnostic(word_count_dictionary, equals_count=constants.markers.In
return paragraph_number_as_word_phrase, filename_for_paragraph_number_details
# --> Case: the equals_count is not invalid, so look "deeply" for the first value
# that is not equal to the provided value stored in equals_count
elif word_count_dictionary and equals_count is not constants.markers.Invalid:
if word_count_dictionary and equals_count is not constants.markers.Invalid:
paragraph_number_details_list = get_first_not_equal_value_deep(
word_count_dictionary, equals_count
)
Expand Down Expand Up @@ -298,7 +298,7 @@ def get_file_diagnostic_deep_exact(file_count_dictionary, value):
if file_details == {}:
file_details = get_first_not_equal_value(file_count_dictionary, value)
# there is some type of exact match in the data set, so extract and return it
if file_details != {} and file_details != (0, 0):
if file_details not in ({}, (0, 0)):
file_name = file_details[0]
file_count = file_details[1][1]
file_name_phrase = (
Expand Down
Loading
Loading