-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
172 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Test the extension via shell script | ||
run: bash ./tests/e2e.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[[source]] | ||
name = "pypi" | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
|
||
[dev-packages] | ||
mypy = "*" | ||
|
||
[packages] | ||
|
||
[requires] | ||
python_version = "3.7" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from typing import Type | ||
from .person import Person | ||
|
||
|
||
class Alice(Person): | ||
|
||
def __init__(self): | ||
super().__init__('Alice') | ||
|
||
|
||
class Bob(Person): | ||
|
||
def __init__(self): | ||
super().__init__('Bob') | ||
|
||
|
||
class Charlie(Person): | ||
|
||
def __init__(self): | ||
super().__init__('Charlie') | ||
|
||
def eat(self): | ||
super().eat() | ||
print('{0} is eating again!'.format(self.name)) | ||
|
||
|
||
class CharlieSon(Charlie): | ||
pass | ||
|
||
class SuperMan(): | ||
|
||
def __init__(self, power: str): | ||
super().__init__() | ||
self.super_power = power | ||
|
||
class CharlieGrandSon(SuperMan, CharlieSon): | ||
|
||
def eat(self): | ||
print('{0} is using {1} to eat.'.format(self.name, self.super_power)) | ||
|
||
|
||
c = Charlie() | ||
c.eat() | ||
|
||
b = Bob() | ||
b.eat() | ||
|
||
p: Type[Person] = Charlie() | ||
p.eat() | ||
|
||
cs = CharlieSon() | ||
cs.name | ||
|
||
cgs = CharlieGrandSon() | ||
cgs.name | ||
cgs.super_power |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Person(): | ||
|
||
def __init__(self, name: str): | ||
super().__init__() | ||
self.name = name | ||
|
||
def eat(self): | ||
print('{0} is eating.'.format(self.name)) |