Skip to content

Commit

Permalink
🔨 add pre-commit rules
Browse files Browse the repository at this point in the history
  • Loading branch information
BbrSofiane committed Mar 11, 2021
1 parent 82ef2fb commit f4b6275
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E203, E266, E501, W503, F403, F401
max-line-length = 89
max-complexity = 18
select = B,C,E,F,W,T4,B9
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.8
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
4 changes: 2 additions & 2 deletions __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def decode_key(key):

# Create a security group
security_group = ec2.SecurityGroup(
f"openedx-sg",
"openedx-sg",
description="Basic Open edX security group",
egress=[
ec2.SecurityGroupEgressArgs(
Expand Down Expand Up @@ -89,7 +89,7 @@ def decode_key(key):
key_name = key.key_name

openedx_instance = ec2.Instance(
f"openedx-instance",
"openedx-instance",
instance_type=size,
vpc_security_group_ids=[security_group.id],
# user_data=user_data,
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pulumi>=2.0.0,<3.0.0
pulumi-aws>=3.2.0,<4.0.0
paramiko>=2.7.1
typing_extensions>=3.7.4
typing_extensions>=3.7.4
pre-commit

0 comments on commit f4b6275

Please sign in to comment.