Lazo
682ab32c3f
Merge pull request #88 from cclauss/patch-2
...
Remove the comma that is halting our tests
2017-07-04 09:41:14 -04:00
Lazo
c133b5d015
Merge pull request #87 from samosaara/master
...
Fix errors from #84
2017-07-04 09:40:54 -04:00
Samuel Henrique
1735d731bf
Adds suggested sanity checks
2017-07-04 10:20:11 -03:00
cclauss
5e4badac3c
Update .travis.yml
2017-07-04 15:00:28 +02:00
cclauss
6864997cab
on_failure: never # always will be the setting once code changes slow down
2017-07-04 10:48:58 +02:00
cclauss
3953765b83
--max-complexity=10
2017-07-04 10:47:10 +02:00
cclauss
7aa9c1e040
Silence the email notifications on_failure
2017-07-04 07:03:39 +02:00
cclauss
0c5626b188
Placate flake8: removed whitespace
2017-07-04 07:02:15 +02:00
cclauss
ab46a50446
Remove that pesky comma
2017-07-04 06:57:51 +02:00
Samuel Henrique
250e8708b7
Merge branch 'master' of https://github.com/LazoCoder/Pokemon-Terminal
2017-07-03 22:42:58 -03:00
Samuel Henrique
8496ede2bb
Fixes issues caused by #84
2017-07-03 22:35:46 -03:00
LazoCoder
ca89626afa
Fixed light/dark bug
...
Traceback (most recent call last):
File "./pokemon", line 298, in <module>
main(sys.argv)
File "./pokemon", line 288, in main
single_argument_handler(argv[1].lower(), ESCAPE_CODE)
File "./pokemon", line 240, in single_argument_handler
change_terminal_background(db, db.get_light().get_name())
AttributeError: 'str' object has no attribute 'get_name'
2017-07-03 21:01:12 -04:00
LazoCoder
ba9e9b3d8f
Fixed "AttributeError: 'ITerm' object has no attribute 'set_pokemon'"
...
Traceback (most recent call last):
File "./pokemon", line 298, in <module>
main(sys.argv)
File "./pokemon", line 288, in main
single_argument_handler(argv[1].lower(), ESCAPE_CODE)
File "./pokemon", line 270, in single_argument_handler
change_terminal_background(db, arg)
File "./pokemon", line 123, in change_terminal_background
scripter.change_terminal(pokemon.get_path())
File "/Users/Laki/Documents/GitHub/Pokemon-Terminal/scripter.py", line 41, in change_terminal
adapter.set_pokemon(image_file_path)
AttributeError: 'ITerm' object has no attribute 'set_pokemon'
2017-07-03 20:57:08 -04:00
Lazo
eee1106466
Merge pull request #84 from cclauss/patch-2
...
Scripter accepts an image_file_path, not a pokemon
2017-07-03 20:49:38 -04:00
Lazo
5451c04a76
Merge pull request #85 from cclauss/patch-6
...
Missing variable assignment
2017-07-03 19:55:47 -04:00
Lazo
b5992d74bb
Merge pull request #86 from samosaara/master
...
get_all and get_[region] fixed.
2017-07-03 19:55:15 -04:00
cclauss
b58f3776b3
Make get_pokemon(name) case insensitive
2017-07-04 01:35:02 +02:00
cclauss
95394753b2
Removed IndexError check & reverted to len() == 0
2017-07-04 00:59:29 +02:00
Samuel Henrique
498614e78a
🤦♂️
2017-07-03 18:15:19 -03:00
Samuel Henrique
a33a9ba817
One more assertion. Extra pokemon loading improvements
2017-07-03 18:10:11 -03:00
cclauss
b8137aca5a
missing variable assignment
...
Also changes for #77
2017-07-03 19:32:38 +02:00
cclauss
0d18e796f7
scripter.change_terminal(pokemon.get_path())
...
Also changes for #77
2017-07-03 18:46:00 +02:00
cclauss
b8974671c4
scripter.change_terminal(pokemon.get_path())
2017-07-03 18:31:50 +02:00
cclauss
2b5e25de51
Tilix.py accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:48:09 +02:00
cclauss
7e07dd10bf
Terminology.py accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:44:34 +02:00
cclauss
cb6e02c8f7
Terminology.py accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:43:46 +02:00
cclauss
e3ad3e1afc
NullAdapter.py accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:41:35 +02:00
cclauss
b95a0ae9c5
ITerm.py accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:40:06 +02:00
cclauss
7469dcbbab
base.py accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:37:03 +02:00
cclauss
7795c1c8d4
Scripter accepts an image_file_path, not a pokemon
...
See issue #83
2017-07-03 16:32:28 +02:00
Samuel Henrique
710428229a
get_all and get_[region] fixed.
2017-07-02 20:46:35 -03:00
Lazo
9c0c43a344
Merge pull request #81 from cclauss/patch-2
...
Move list, dict from class level to instance level
2017-07-02 16:21:27 -04:00
cclauss
47380b5df8
move __pokemon_type_dictionary from class --> instance
...
https://github.com/LazoCoder/Pokemon-Terminal/pull/81#issuecomment-312487428
This is ready for review.
2017-07-02 16:34:34 +02:00
cclauss
56cfcedb49
Move list, dict from class level to instance level
...
Creating two instance of the Database class throws `Exception: Duplicate names detected.`
You can see this by running the code:
```python
db0 = Database() # create the fist db... no problems
db1 = Database() # Exception: Duplicate names detected
```
This is caused because all instances of a class share each class level variable so when db1 wants to add a pokemon to the list, it sees that db0 has already added it. Class-level variables are good for constants but in general should be avoided for things that get modified at runtime unless shared state between all instances is desireable.
This is a problem because pytest will create multiple databases as it sets up, executes, and tears down tests various aspects of the app. The cleanest fix to this problem that I can think of is to demote the list and dict from being class level to being instance level. This way each instance has its own separate copy and we reduce shared state
2017-07-01 23:32:22 +02:00
Lazo
1456fbae2c
Merge pull request #80 from samosaara/master
...
FIxes line length and custom pokemon loading.
2017-07-01 13:16:33 -04:00
Samuel Henrique
f7be3ea7b0
FIxes line length and custom pokemon loading.
2017-07-01 13:50:54 -03:00
Lazo
8a6e42c051
Merge pull request #75 from cclauss/patch-2
...
De-duplication: nidoran*2 --> nidoran-f, nidoran-m
2017-07-01 12:40:50 -04:00
Lazo
3b5c97d188
Merge pull request #78 from samosaara/patch-1
...
Update README.md
2017-07-01 12:40:15 -04:00
Samuel Henrique
622f65e018
Identation.
2017-07-01 09:44:01 -03:00
Samuel Henrique
a6c057175c
Update README.md
...
Install instructions and new type sub-command.
2017-07-01 09:39:41 -03:00
cclauss
b363a479a8
De-duplication: nidoran*2 --> nidoran-f, nidoran-f
...
The need for this change is discussed at
https://github.com/LazoCoder/Pokemon-Terminal/pull/70#pullrequestreview-47279098
The other two possibilities, nidoran-♀ and nidoran-♂ were discussed there.
@samosaara Please review this PR.
2017-07-01 05:01:56 +02:00
Lazo
83fa1c30e1
Merge pull request #70 from samosaara/master
...
Improves and unifies pokemon database, type subcommand
2017-06-30 18:53:05 -04:00
Lazo
45d4146b2f
Merge branch 'master' into master
2017-06-30 17:37:05 -04:00
Lazo
596ff7ec6e
Merge pull request #60 from cclauss/patch-2
...
Create .travis.yml
2017-06-30 17:08:53 -04:00
Lazo
4b2fbb4dba
Merge pull request #69 from cclauss/patch-4
...
Make main() a separate function so we can test it
2017-06-30 17:05:52 -04:00
Samuel Henrique
26b2c396b6
Local escape code variables.
2017-06-29 16:36:16 -03:00
Samuel Henrique
4fc2c613ef
Type commands
2017-06-29 15:17:16 -03:00
cclauss
7e84a4f5c6
Create a global Database instance at startup time
2017-06-29 19:42:55 +02:00
cclauss
7b4a7656fc
Remove Python 2 from testing and add Python 3.5.0
...
Pokemon-Terminal does not support Python 2.
2017-06-29 19:08:52 +02:00
cclauss
911dff25f3
named_tuple --> namedtuple
2017-06-29 18:59:02 +02:00