File size: 3,303 Bytes
38fb4a1
433d10a
38fb4a1
 
 
 
433d10a
7d4eb47
 
85ac990
 
7d4eb47
 
 
38fb4a1
 
 
 
 
 
 
 
 
 
 
 
 
7d4eb47
38fb4a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7d4eb47
 
667fe9d
38fb4a1
 
 
 
 
 
 
 
 
 
 
7d4eb47
 
 
38fb4a1
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[tool.poetry]
name = "sentiment-analysis"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
click = "^8.1.7"
scikit-learn = "^1.4.2"
gradio = "^4.31.0"
colorama = "^0.4.6"
nltk = "^3.8.1"
pandas = "^2.2.2"
numpy = "^1.26.4"
seaborn = "^0.13.2"

[tool.poetry.group.dev.dependencies]
ruff = "^0.4.1"
pre-commit = "^3.7.0"
ipykernel = "^6.29.4"
ipympl = "^0.9.4"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
extend-include = ["*.ipynb"]
src = ["app"]
line-length = 120
indent-width = 4

[tool.ruff.lint]
fixable = ["ALL"]
ignore = [
  "E501",    # pycodestyle line too long, handled by black
  "D100",    # pydocstyle - missing docstring in public module
  "D101",    # pydocstyle - missing docstring in public class
  "D102",    # pydocstyle - missing docstring in public method
  "D103",    # pydocstyle - missing docstring in public function
  "D104",    # pydocstyle - missing docstring in public package
  "D105",    # pydocstyle - missing docstring in magic method
  "D106",    # pydocstyle - missing docstring in public nested class
  "D107",    # pydocstyle - missing docstring in __init__
  "D202",    # pydocstyle - no blank lines allowed after function docstring
  "D205",    # pydocstyle - 1 blank line required between summary line and description
  "D415",    # pydocstyle - first line should end with a period, question mark, or exclamation point
  "UP037",   # pyupgrade - removes quotes from type annotation
  "A003",    # flake8-builtins - class attribute {name} is shadowing a python builtin
  "B010",    # flake8-bugbear - do not call setattr with a constant attribute value
  "B008",    #  flake8-bugbear - Do not perform function call `Parameter` in argument defaultsRuff(B008)
  "RUF012",  # ruff - mutable class attributes should be annotated with `typing.ClassVar`
  "ANN401",  # ruff - Dynamically typed expressions (typing.Any) are disallowed
  "ANN102",
  "ANN101",  # ruff - Missing type annotation for `self` in method
  "PLR0913", # ruff - Too many arguments to function call
  "PLR2004", # Magic value used in comparison
  "FBT001",  # Boolean typed positional argument in function definition
  "FBT002",  # Boolean default positional argument in function definition
  "FBT003",  # Boolean Boolean default positional argument in function definition
  "ARG002",  # Unused method argument
  "ARG001",  #  Unused function argument
  "TD002",
  "TD003",
  "FIX002",
  "PGH003",
  "RUF006",
  "SLF001",
  "PT007",
  'PT004',
  'PT005',
  'S603',
  "E501",    # pycodestyle line too long, handled by black
  "PLW2901", # pylint - for loop variable overwritten by assignment target
  "ANN401",
  "ANN102",
  "ANN101",
  "FBT",
  "PLR0913", # too many arguments
  "PT",
  "TD",
  "PERF203", # ignore for now; investigate
  "T201",    # print
  "ANN204",  # missing-return-type-special-method
  "ERA001",  # commented-out-code
]
select = ["ALL"]
# Allow unused variables when underscore-prefixed
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.mccabe]
max-complexity = 12

[tool.ruff.lint.isort]
known-first-party = ["app"]

[tool.ruff.format]
docstring-code-format = true

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402"]