Commit Graph

31 Commits

Author SHA1 Message Date
funilrys
05dad7e657
Introduction of Black: The uncompromising Python code formatter.
Please find more about it there:
* https://github.com/python/black
* https://black.readthedocs.io/en/stable/
2019-07-13 13:40:13 +02:00
funilrys
c0d661f388
Review of the notion of keepdomaincomments
This patch fix StevenBlack/hosts#777

This patch:
  * Change the default state of keepdomaincomments.
    * Indeed, comments are now displayed by default.
    * But if you don't need comments, feel free to use the argument.
  * Delete the requirement input when calling the `-k` argument.
  * Update tests case regarding the new state of keepdomaincomments.
2018-09-14 00:15:56 +02:00
gfyoung
92442955bc
Minor house-cleaning
* No parentheses single-line string
* Remove builtins function, which was
really for Python 2.x compatibility
2018-09-06 21:12:48 -07:00
gfyoung
d8df5f1dc4
Use example files to allow proper git-ignoring
The following files:

* myhosts
* blacklist
* whitelist

can be all be modified by the user for personal usage.
However, git is tracking these files since they exist
in the repository, which makes it difficult to do so
without accidentally pushing one's own customizations.

This commit converts those examples to ".example" files,
which serve as the defaults if one of the files listed
above does not exist.

Closes gh-144.
2018-09-06 12:20:37 -07:00
funilrys
7c2da6044e
Deletion of unneeded comment 2018-09-05 23:53:57 -04:00
funilrys
782a178596
This patch fix https://github.com/StevenBlack/hosts/pull/730#discussion_r205657347 2018-09-05 23:53:57 -04:00
funilrys
e246960c43
Fixing flake8 issues 2018-09-05 23:53:57 -04:00
funilrys
58db5143ed
Deletion of future dependencies
Also:
  * deletion of raw_input
2018-09-05 23:53:35 -04:00
funilrys
edb4f57da4
Fix flake8 issue.
This patch is related to https://github.com/StevenBlack/hosts/issues/729
2018-09-05 23:53:11 -04:00
funilrys
eb37488a16
Sorting and update of imports && deletion of Python2 related logic
This patch is related to https://github.com/StevenBlack/hosts/issues/729
2018-09-05 23:53:11 -04:00
funilrys
11d8c064ac
Deletion of unneeded comment 2018-09-05 23:51:29 -04:00
funilrys
52e25bf7b9
This patch fix https://github.com/StevenBlack/hosts/pull/730#discussion_r205657347 2018-09-05 23:51:29 -04:00
funilrys
6a28f41fdc
Fixing flake8 issues 2018-09-05 23:51:29 -04:00
funilrys
928bb5201c
Deletion of future dependencies
Also:
  * deletion of raw_input
2018-09-05 23:51:28 -04:00
funilrys
8ebad236c6
Fix flake8 issue.
This patch is related to https://github.com/StevenBlack/hosts/issues/729
2018-09-05 23:51:27 -04:00
funilrys
05c2c6c825
Sorting and update of imports && deletion of Python2 related logic
This patch is related to https://github.com/StevenBlack/hosts/issues/729
2018-09-05 23:51:27 -04:00
gfyoung
e66c2cb37e
Doc / Check for Centos restart
Closes gh-622.
2018-05-22 21:53:56 -04:00
Steven Black
03c247bfab Test to accompany accepting IP followed by host IP address. 2018-03-14 00:10:07 -04:00
funilrys
318389b08f
Introduction of more tests cases
Please note that this patch introduce more tests cases
in order to avoid future issue when calling `domains_to_idna()`
2018-03-04 11:18:50 +01:00
funilrys
4798710029
Introduction of domain_to_idna() tests. 2018-03-02 22:23:21 +01:00
Ankit Pati
9a8b507f6e
update defaults dictionary for minimise switch 2018-02-17 07:22:45 +05:30
Stefano
ce8d3abf7e Added an option to compress the created host file.
In particular, the compression option removes non-necessary lines (empty lines and comments) and puts multiple domains in each line.
This option should solve the issue #411 regarding the DNS client service of Windows.
2017-12-30 17:12:04 +01:00
gfyoung
24ab22e139
Refactor out source data updating 2017-08-20 11:52:28 -07:00
Steven Black
3edb53c7d9 Remove references to .zip files in the tests. 2017-08-20 12:00:38 -04:00
gfyoung
f83a56d317 Refactor out global settings usage in update logic 2017-08-09 08:13:22 -07:00
gfyoung
942069db81 Refactor out global settings usage in exclusions 2017-08-07 08:43:47 -07:00
gfyoung
50dd78f74d Add Python 3.5 testing to Travis 2017-08-02 20:57:11 -07:00
gfyoung
4b96f3f34a Refactor out global settings usage in user prompt 2017-07-13 08:20:03 -07:00
Indrajit Raychaudhuri
e8aeadb6b3 Add more tests for normalized host filter 2017-07-08 19:52:30 -05:00
gfyoung
415b89a022 Reduce dependency on global settings variable
Global variables make code less modular
and therefore more difficult to test.
2017-07-03 18:42:15 -07:00
gfyoung
dce24af399 Add unittests for updateHostsFile.py 2017-06-28 20:13:01 -07:00