Skip to content
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
9 changes: 9 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import numpy as np

if __name__ == '__main__':
numbers = [n for n in range(1, 11)]
numbers_array = np.array(numbers)


numbers_array = np.array(numbers)
print(numbers_array)
66 changes: 66 additions & 0 deletions pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace # Trailing whitespace checker
- id: end-of-file-fixer # End-of-file newline checker
- id: check-yaml # YAML syntax checker
- id: check-added-large-files # Prevents you from committing large files
- id: check-ast # Python AST checker
- id: check-json # JSON syntax checker
- id: check-xml # XML syntax checker

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
# source: https://github.com/DmytroLitvinov/awesome-flake8-extensions
# all-in-one plugins
- flake8-bugbear # tries to find bugs in your code
- flake8-simplify # encourages simplification of complex expressions

# clean code
- flake8-comprehensions # helps you write better list/set/dict comprehensions
- flake8-picky-parentheses # checks for redundant parentheses and alignment of parentheses and brackets
- flake8-return # plugin that checks return values

# naming
- flake8-builtins # checks for python builtins being used as variables or parameters
- flake8-variables-names # checks for good variable names
- pep8-naming # enforces PEP 8 naming conventions

# complexity
- flake8-cognitive-complexity # plugin that checks for high cognitive complexity
- flake8-annotations-complexity # enforces complexity limits for function annotations

# docstrings
- flake8-spellcheck # checks spelling
- flake8-docstrings # docstring conventions

# imports
- flake8-import-order # enforces a lexicographic ordering of import statements

# Comments
- flake8-eradicate # enforces the removal of commented out code

# Annotations
- flake8-black # enforces black formatting
args:
[
"--max-line-length",
"88",
"--extend-ignore",
"D100, SC200",
"--max-cognitive-complexity",
"3",
]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
numpy == 1.26.1