Skip to content

Commit

Permalink
2015: Set up pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
jp7677 committed Dec 15, 2024
1 parent 0487897 commit b1bbc6b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ jobs:
run: |
cd 2015
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: Run AoC 2015
run: |
cd 2015
pylint .
pytest
AoC-2017:
Expand Down
15 changes: 15 additions & 0 deletions 2015/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "aoc2015"
version = "0.0.1"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"pylint==3.3.2",
"pytest==8.3.4",
]

[tool.pylint.'MESSAGES CONTROL']
disable = [
"missing-module-docstring",
"missing-function-docstring",
]
1 change: 0 additions & 1 deletion 2015/requirements.txt

This file was deleted.

6 changes: 2 additions & 4 deletions 2015/util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
def read_input(name):
input_data = open("./data/" + name, "r")
data = input_data.read().strip()
input_data.close()
return data
with open("./data/" + name, mode="r", encoding="utf-8") as file:
return file.read().strip()

0 comments on commit b1bbc6b

Please sign in to comment.