Skip to content

Commit 5522e46

Browse files
author
Shehab Abdel-Salam
committed
Tidy up
1 parent 1402af0 commit 5522e46

File tree

14 files changed

+17
-19
lines changed

14 files changed

+17
-19
lines changed

chapters/chapter10_oop/exercises/exercise_70.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# circle = Circle(5)
1111
# assert circle.area() == 78.54
1212

13-
from abc import ABC, abstractmethod
13+
from abc import ABC, abstractmethod # noqa: F401
1414

1515
PI = 3.14159
1616

chapters/chapter10_oop/exercises/exercise_72.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# assert shelf.get_books_by_genre(Genre.Fiction) == [book1, book2]
2222
# shelf.remove_book(book1)
2323

24-
from .exercise_71 import Book, Genre
24+
from .exercise_71 import Book, Genre # noqa: F401
2525

2626

2727
class BookShelf:

chapters/chapter10_oop/exercises/exercise_73.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
# assert library.is_book_in_library(Book("Non Existing Book", author, 2021, Genre.Fiction)) is False
2727
# library.remove_shelf(shelf1)
2828
# assert library.get_books() == [book2]
29-
from .exercise_71 import Book, Genre
30-
from .exercise_72 import BookShelf
29+
from .exercise_71 import Book, Genre # noqa: F401
30+
from .exercise_72 import BookShelf # noqa: F401
3131

3232

3333
class Library:

chapters/chapter10_oop/exercises/exercise_74.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# 5. total_balance (a float)
2525

2626
from __future__ import annotations
27-
from dataclasses import dataclass, field
27+
from dataclasses import dataclass, field # noqa: F401
2828

2929

3030
@dataclass
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# Exercise 81 - Functools
22
# Write a function that uses `functools.partial` to create a function that always multiplies by 10.
3-
from functools import partial
43

54

65
def multiply(x, y):
76
return x * y
87

98

10-
def multiply(): ...
11-
12-
139
multiply_by_10 = ...

chapters/chapter11_standard_library/exercises/exercise_82.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Exercise 82 - Flatten a List of Lists
22
# Write a function that flattens a list of lists using `itertools.chain`.
33
# The function should take a list of lists and return a single flattened list.
4-
from itertools import chain
54

65
# Example:
76
# flatten_list_of_lists([[1, 2, 3], [4, 5], [6, 7, 8, 9]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9]

chapters/chapter11_standard_library/exercises/exercise_83.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Exercise 83 - Cached Fibonacci
22
# Given this fibonacci function, we want to cache the results using `functools.lru`.
3-
from functools import lru_cache
43

54

65
def compute_fibonacci(n: int) -> int:

chapters/chapter11_standard_library/exercises/exercise_84.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Can you fix this?
77

8-
import logging
8+
import logging # noqa: F401
99

1010

1111
class RateInterestCalculator:

chapters/chapter11_standard_library/exercises/exercise_85.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# The timestamp should be converted to a `datetime` object.
55
#
66
from dataclasses import dataclass
7-
from datetime import datetime
7+
from datetime import datetime # noqa: F401
88

99
# Example:
1010
# 2024-09-01,Sold 100 shares of AAPL

chapters/chapter14_testing/tests/test_ch14.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import pytest
2-
from ..exercises.exercise_94 import clean_text
3-
from ..exercises.exercise_95 import SalaryCalculator
4-
from ..exercises.exercise_96 import ProductSalesCalculator, Discount
1+
import pytest # noqa: F401
2+
from ..exercises.exercise_94 import clean_text # noqa
3+
from ..exercises.exercise_95 import SalaryCalculator # noqa: F401
4+
from ..exercises.exercise_96 import ProductSalesCalculator, Discount # noqa: F401
55

66

77
def test_e94():

0 commit comments

Comments
 (0)