Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent a979f67 commit a9d804f
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 15 deletions.
6 changes: 3 additions & 3 deletions lectures/pandas/PublicAPIs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3320,9 +3320,9 @@
"source": [
"url = \"https://api.met.no/weatherapi/locationforecast/2.0/compact?lat=51.5&lon=0\"\n",
"s = requests.Session()\n",
"s.headers[\n",
" \"User-Agent\"\n",
"] = \"uio-in3110 https://github.com/uio-in3110/uio-in3110.github.io\"\n",
"s.headers[\"User-Agent\"] = (\n",
" \"uio-in3110 https://github.com/uio-in3110/uio-in3110.github.io\"\n",
")\n",
"r = s.get(url)\n",
"r"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .cli import main

if __name__ == "__main__":
main()
main()
3 changes: 1 addition & 2 deletions lectures/python/exercises.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,7 @@
"metadata": {},
"outputs": [],
"source": [
"class Square(...):\n",
" ...\n",
"class Square(...): ...\n",
"\n",
"\n",
"sq = Square(5)\n",
Expand Down
3 changes: 1 addition & 2 deletions lectures/python/point.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
class Point:
"""Class representing a 2-D Cartesian point"""

def __init__(self, x, y):
...
def __init__(self, x, y): ...

def __repr__(self):
return f"Point({self.x}, {self.y})"
Expand Down
1 change: 0 additions & 1 deletion lectures/web-servers/monty-hall-game/game_server2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- The template contains a form with a POST request to the /reselect.
"""


from fastapi import FastAPI, Request
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates
Expand Down
1 change: 0 additions & 1 deletion lectures/web-servers/monty-hall-game/game_server3.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
and displays it in the reselect3.html template
"""


from fastapi import FastAPI, Form, Request
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates
Expand Down
1 change: 0 additions & 1 deletion lectures/web-servers/monty-hall-game/game_server4.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"""


import random
import uuid

Expand Down
1 change: 0 additions & 1 deletion lectures/web-servers/monty-hall-game/game_server6.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
information
"""


import random
import uuid
from statistics import mean
Expand Down
1 change: 0 additions & 1 deletion lectures/web-servers/monty-hall-game/game_server7.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
information
"""


import random
import uuid
from statistics import mean
Expand Down
1 change: 0 additions & 1 deletion lectures/web-servers/monty-hall-game/game_server_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
information
"""


import random
import uuid
from functools import partial
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use in combination with autoplay.py to play monty hall via a REST API.
"""


import random
import uuid
from enum import IntEnum
Expand Down

0 comments on commit a9d804f

Please sign in to comment.