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

chore: upgrade python version to 3.12 #103

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: [3.12]
steps:
- uses: actions/checkout@v2
- name: setup python
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12
- name: Install pip, setuptools, and wheel
run: pip install -r requirements/pip.txt
- name: Install dependencies
Expand All @@ -58,7 +58,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12
- name: Install pip, setuptools, and wheel
run: pip install -r requirements/pip.txt
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
6 changes: 3 additions & 3 deletions dbt_schema_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def run(self, source_database, schema, banned_column_names): # pylint: disable=
"""
# Check for any non-word characters that might indicate a SQL injection attack
if re.search("[^a-zA-Z0-9_]", schema):
raise Exception( # pylint: disable=broad-exception-raised
raise Exception(
"Non-word character in schema name '{}'! Possible SQL injection?".format(
schema
)
Expand All @@ -162,7 +162,7 @@ def run(self, source_database, schema, banned_column_names): # pylint: disable=

try:
catalog = self.fetch_full_catalog(adapter, source_database, schema, banned_column_names)
except Exception as e: # pylint: disable=broad-except
except Exception as e:
# TODO: Catch a less-broad exception than Exception.
if "Information schema query returned too much data" not in str(e):
raise
Expand Down Expand Up @@ -605,7 +605,7 @@ def get_project_dirs(self):

for project_path in [source_project_path, destination_project_path]:
if not os.path.exists(os.path.join(project_path, "dbt_project.yml")):
raise Exception( # pylint: disable=broad-exception-raised
raise Exception(
"fatal: {} is not a dbt project. Does not exist or is missing a "
"dbt_project.yml file.".format(project_path)
)
Expand Down
117 changes: 10 additions & 107 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ** DO NOT EDIT THIS FILE **
# ***************************
#
# This file was generated by edx-lint: https://github.com/edx/edx-lint
# This file was generated by edx-lint: https://github.com/openedx/edx-lint
#
# If you want to change this file, you have two choices, depending on whether
# you want to make a local change that applies only to this repo, or whether
Expand All @@ -28,7 +28,7 @@
# CENTRAL CHANGE:
#
# 1. Edit the pylintrc file in the edx-lint repo at
# https://github.com/edx/edx-lint/blob/master/edx_lint/files/pylintrc
# https://github.com/openedx/edx-lint/blob/master/edx_lint/files/pylintrc
#
# 2. install the updated version of edx-lint (in edx-lint):
#
Expand Down Expand Up @@ -64,7 +64,7 @@
# SERIOUSLY.
#
# ------------------------------
# Generated by edx-lint version: 5.2.1
# Generated by edx-lint version: 5.4.1
# ------------------------------
[MASTER]
ignore = migrations
Expand Down Expand Up @@ -102,54 +102,39 @@ enable =
cell-var-from-loop,
confusing-with-statement,
continue-in-finally,
cyclical-import,
dangerous-default-value,
dict-items-not-iterating,
dict-keys-not-iterating,
dict-values-not-iterating,
duplicate-argument-name,
duplicate-bases,
duplicate-except,
duplicate-key,
eq-without-hash,
exception-escape,
exception-message-attribute,
expression-not-assigned,
filter-builtin-not-iterating,
format-combined-specification,
format-needs-mapping,
function-redefined,
global-variable-undefined,
import-error,
import-self,
inconsistent-mro,
indexing-exception,
inherit-non-class,
init-is-generator,
invalid-all-object,
invalid-encoded-data,
invalid-format-index,
invalid-length-returned,
invalid-sequence-index,
invalid-slice-index,
invalid-slots-object,
invalid-slots,
invalid-str-codec,
invalid-unary-operand-type,
logging-too-few-args,
logging-too-many-args,
logging-unsupported-format,
lost-exception,
map-builtin-not-iterating,
method-hidden,
misplaced-bare-raise,
misplaced-future,
missing-format-argument-key,
missing-format-attribute,
missing-format-string-key,
missing-super-argument,
mixed-fomat-string,
model-unicode-not-callable,
no-member,
no-method-argument,
no-name-in-module,
Expand All @@ -158,44 +143,32 @@ enable =
non-iterator-returned,
non-parent-method-called,
nonexistent-operator,
nonimplemented-raised,
nonstandard-exception,
not-a-mapping,
not-an-iterable,
not-callable,
not-context-manager,
not-in-loop,
pointless-statement,
pointless-string-statement,
property-on-old-class,
raising-bad-type,
raising-non-exception,
raising-string,
range-builtin-not-iterating,
redefined-builtin,
redefined-in-handler,
redefined-outer-name,
redefined-variable-type,
redundant-keyword-arg,
relative-import,
repeated-keyword,
return-arg-in-generator,
return-in-init,
return-outside-function,
signature-differs,
slots-on-old-class,
super-init-not-called,
super-method-not-called,
super-on-old-class,
syntax-error,
sys-max-int,
test-inherits-tests,
too-few-format-args,
too-many-format-args,
too-many-function-args,
translation-of-non-string,
truncated-format-string,
unbalance-tuple-unpacking,
undefined-all-variable,
undefined-loop-variable,
undefined-variable,
Expand All @@ -211,11 +184,8 @@ enable =
used-before-assignment,
using-constant-test,
yield-outside-function,
zip-builtin-not-iterating,

astroid-error,
django-not-available-placeholder,
django-not-available,
fatal,
method-check-failed,
parse-error,
Expand All @@ -237,7 +207,6 @@ enable =
bad-classmethod-argument,
bad-mcs-classmethod-argument,
bad-mcs-method-argument,
bad-whitespace,
bare-except,
broad-except,
consider-iterating-dictionary,
Expand All @@ -247,16 +216,10 @@ enable =
literal-used-as-attribute,
logging-format-interpolation,
logging-not-lazy,
metaclass-assignment,
model-has-unicode,
model-missing-unicode,
model-no-explicit-unicode,
multiple-imports,
multiple-statements,
no-classmethod-decorator,
no-staticmethod-decorator,
old-raise-syntax,
old-style-class,
protected-access,
redundant-unittest-assert,
reimported,
Expand Down Expand Up @@ -284,7 +247,6 @@ enable =
wrong-import-position,

missing-final-newline,
mixed-indentation,
mixed-line-endings,
trailing-newlines,
trailing-whitespace,
Expand All @@ -295,39 +257,17 @@ enable =
deprecated-pragma,
unrecognized-inline-option,
useless-suppression,

cmp-method,
coerce-method,
delslice-method,
dict-iter-method,
dict-view-method,
div-method,
getslice-method,
hex-method,
idiv-method,
next-method-called,
next-method-defined,
nonzero-method,
oct-method,
rdiv-method,
setslice-method,
using-cmp-argument,
disable =
bad-continuation,
bad-indentation,
broad-exception-raised,
consider-using-f-string,
duplicate-code,
file-ignored,
fixme,
global-statement,
invalid-name,
locally-disabled,
locally-enabled,
lowercase-l-suffix,
misplaced-comparison-constant,
no-else-return,
no-init,
no-self-use,
suppressed-message,
too-few-public-methods,
too-many-ancestors,
Expand All @@ -346,54 +286,18 @@ disable =
feature-toggle-needs-doc,
illegal-waffle-usage,

apply-builtin,
backtick,
bad-python3-import,
basestring-builtin,
buffer-builtin,
cmp-builtin,
coerce-builtin,
deprecated-itertools-function,
deprecated-operator-function,
deprecated-str-translate-call,
deprecated-string-function,
deprecated-sys-function,
deprecated-types-field,
deprecated-urllib-function,
execfile-builtin,
file-builtin,
import-star-module-level,
input-builtin,
intern-builtin,
long-builtin,
long-suffix,
no-absolute-import,
non-ascii-bytes-literal,
old-division,
old-ne-operator,
old-octal-literal,
parameter-unpacking,
print-statement,
raw_input-builtin,
reduce-builtin,
reload-builtin,
round-builtin,
standarderror-builtin,
unichr-builtin,
unicode-builtin,
unpacking-in-except,
xrange-builtin,

logging-fstring-interpolation,
too-many-positional-arguments,
useless-option-value,
unknown-option-value,
broad-exception-caught

[REPORTS]
output-format = text
files-output = no
reports = no
score = no

[BASIC]
bad-functions = map,filter,apply,input
module-rgx = (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
const-rgx = (([A-Z_][A-Z0-9_]*)|(__.*__)|log|urlpatterns)$
class-rgx = [A-Z_][a-zA-Z0-9]+$
Expand All @@ -413,7 +317,6 @@ docstring-min-length = 5
max-line-length = 120
ignore-long-lines = ^\s*(# )?((<?https?://\S+>?)|(\.\. \w+: .*))$
single-line-if-stmt = no
no-space-check = trailing-comma,dict-separator
max-module-lines = 1000
indent-string = ' '

Expand Down Expand Up @@ -482,6 +385,6 @@ ext-import-graph =
int-import-graph =

[EXCEPTIONS]
overgeneral-exceptions = Exception
overgeneral-exceptions = builtins.Exception

# 4aab3dcb4fa137c503562dcd26a3be774bc1055e
# 149915b3c49e5a9cc335781eeca6c21aba352c82
7 changes: 7 additions & 0 deletions pylintrc_tweaks
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
[MASTER]
ignore = migrations
load-plugins = edx_lint.pylint,pylint_celery

[MESSAGES CONTROL]
DISABLE+=
too-many-positional-arguments,
useless-option-value,
unknown-option-value,
broad-exception-caught
Loading
Loading