Skip to content

Commit 4148971

Browse files
authored
Merge branch 'master' into python-menus-toolbars
2 parents 4a53bea + 80a721e commit 4148971

File tree

20 files changed

+165
-137
lines changed

20 files changed

+165
-137
lines changed

.dependabot/config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
open-pull-requests-limit: 10
8+
allow:
9+
- dependency-name: flake8
10+
- dependency-name: black

arcade-a-primer/arcade_basic_oop.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@
1414

1515

1616
class Welcome(arcade.Window):
17-
"""Our main welcome window
18-
"""
17+
"""Our main welcome window"""
1918

2019
def __init__(self):
21-
"""Initialize the window
22-
"""
20+
"""Initialize the window"""
2321

2422
# Call the parent class constructor
2523
super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
@@ -28,8 +26,7 @@ def __init__(self):
2826
arcade.set_background_color(arcade.color.WHITE)
2927

3028
def on_draw(self):
31-
"""Called whenever we need to draw our window
32-
"""
29+
"""Called whenever we need to draw our window"""
3330

3431
# Clear the screen and start drawing
3532
arcade.start_render()

arcade-a-primer/arcade_draw_shapes.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313

1414

1515
class Welcome(arcade.Window):
16-
"""Our main welcome window
17-
"""
16+
"""Our main welcome window"""
1817

1918
def __init__(self):
20-
"""Initialize the window
21-
"""
19+
"""Initialize the window"""
2220

2321
# Call the parent class constructor
2422
super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
@@ -27,8 +25,7 @@ def __init__(self):
2725
arcade.set_background_color(arcade.color.WHITE)
2826

2927
def on_draw(self):
30-
"""Called whenever we need to draw our window
31-
"""
28+
"""Called whenever we need to draw our window"""
3229

3330
# Clear the screen and start drawing
3431
arcade.start_render()

arcade-a-primer/arcade_game.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ class SpaceShooter(arcade.Window):
4141
"""
4242

4343
def __init__(self, width: int, height: int, title: str):
44-
"""Initialize the game
45-
"""
44+
"""Initialize the game"""
4645
super().__init__(width, height, title)
4746

4847
# Setup the empty sprite lists
@@ -51,8 +50,7 @@ def __init__(self, width: int, height: int, title: str):
5150
self.all_sprites = arcade.SpriteList()
5251

5352
def setup(self):
54-
"""Get the game ready to play
55-
"""
53+
"""Get the game ready to play"""
5654

5755
# Set the background color
5856
arcade.set_background_color(arcade.color.SKY_BLUE)
@@ -236,8 +234,7 @@ def on_update(self, delta_time: float):
236234
self.player.left = 0
237235

238236
def on_draw(self):
239-
"""Draw all game objects
240-
"""
237+
"""Draw all game objects"""
241238

242239
arcade.start_render()
243240
self.all_sprites.draw()

concurrency-overview/requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ attrs==18.1.0
88
certifi==2018.8.13
99
chardet==3.0.4
1010
contextvars==2.3
11-
flake8==3.5.0
1211
h11==0.8.1
1312
idna==2.7
1413
immutables==0.6
@@ -23,8 +22,6 @@ pathlib2==2.3.2
2322
pluggy==0.7.1
2423
py==1.6.0
2524
pycodestyle==2.3.1
26-
pyflakes==1.6.0
27-
pylint==2.1.1
2825
pytest==3.7.3
2926
requests==2.19.1
3027
six==1.11.0

django-view-auth/Blog/core/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def see_request(request):
2929
scheme: {request.scheme}
3030
path: {request.path}
3131
method: {request.method}
32-
GET: {request.GET}
33-
user: {request.user}
32+
GET: {request.GET}
33+
user: {request.user}
3434
"""
3535

3636
return HttpResponse(text, content_type="text/plain")

django-view-auth/Blog/db.sqlite3

-132 KB
Binary file not shown.

django-view-auth/Blog/pyflakes.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

django-view-auth/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Get Started With Django Part 3: Django View Authorization, Code Examples
2+
3+
This folder contains the sample code for [Get Started With Django Part 3: Django View Authorization](https://realpython.com/django-view-authorization/).
4+
5+
The code was tested with Python 3.8 and Django 3.0.7. To install the same version, use:
6+
7+
python -m pip install -r requirements.txt
8+
9+
This tutorial uses the Django admin, and comes with some sample data. To get going you will need to run the following commands:
10+
11+
cd Blog
12+
python manage.py migrate
13+
python manage.py createsuperuser
14+
python manage.py loaddata core.json
15+
16+
Once those commands are complete, you can run the Django development server:
17+
18+
python manage.py runserver
19+
20+
With the server running, visit `http://127.0.0.1:8000` in your web browser to see the results.

0 commit comments

Comments
 (0)