Skip to content

Commit

Permalink
Blackify
Browse files Browse the repository at this point in the history
  • Loading branch information
barseghyanartur committed Jun 4, 2021
1 parent 817a813 commit c721fee
Show file tree
Hide file tree
Showing 9 changed files with 495 additions and 459 deletions.
24 changes: 12 additions & 12 deletions src/tld/__init__.py
Expand Up @@ -8,17 +8,17 @@
update_tld_names,
)

__title__ = 'tld'
__version__ = '0.12.5'
__author__ = 'Artur Barseghyan'
__copyright__ = '2013-2021 Artur Barseghyan'
__license__ = 'MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later'
__title__ = "tld"
__version__ = "0.12.5"
__author__ = "Artur Barseghyan"
__copyright__ = "2013-2021 Artur Barseghyan"
__license__ = "MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later"
__all__ = (
'get_fld',
'get_tld',
'get_tld_names',
'is_tld',
'parse_tld',
'Result',
'update_tld_names',
"get_fld",
"get_tld",
"get_tld_names",
"is_tld",
"parse_tld",
"Result",
"update_tld_names",
)
14 changes: 7 additions & 7 deletions src/tld/conf.py
@@ -1,14 +1,14 @@
from typing import Any
from . import defaults

__author__ = 'Artur Barseghyan'
__copyright__ = '2013-2020 Artur Barseghyan'
__license__ = 'MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later'
__author__ = "Artur Barseghyan"
__copyright__ = "2013-2020 Artur Barseghyan"
__license__ = "MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later"
__all__ = (
'get_setting',
'reset_settings',
'set_setting',
'settings',
"get_setting",
"reset_settings",
"set_setting",
"settings",
)


Expand Down
10 changes: 5 additions & 5 deletions src/tld/defaults.py
@@ -1,11 +1,11 @@
from os.path import dirname

__author__ = 'Artur Barseghyan'
__copyright__ = '2013-2020 Artur Barseghyan'
__license__ = 'MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later'
__author__ = "Artur Barseghyan"
__copyright__ = "2013-2020 Artur Barseghyan"
__license__ = "MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later"
__all__ = (
'DEBUG',
'NAMES_LOCAL_PATH_PARENT',
"DEBUG",
"NAMES_LOCAL_PATH_PARENT",
)

# Absolute base path that is prepended to NAMES_LOCAL_PATH
Expand Down
45 changes: 39 additions & 6 deletions src/tld/res/effective_tld_names.dat.txt
Expand Up @@ -10800,6 +10800,10 @@ apigee.io
appspacehosted.com
appspaceusercontent.com

// Appudo UG (haftungsbeschränkt) : https://www.appudo.com
// Submitted by Alexander Hochbaum <admin@appudo.com>
appudo.net

// Aptible : https://www.aptible.com/
// Submitted by Thomas Orozco <thomas@aptible.com>
on-aptible.com
Expand Down Expand Up @@ -10829,6 +10833,10 @@ myasustor.com
// Submitted by Andreas Weise <a.weise@avm.de>
myfritz.net

// AVStack Pte. Ltd. : https://avstack.io
// Submitted by Jasper Hugo <jasper@avstack.io>
onavstack.net

// AW AdvisorWebsites.com Software Inc : https://advisorwebsites.com
// Submitted by James Kennedy <domains@advisorwebsites.com>
*.awdev.ca
Expand Down Expand Up @@ -10869,6 +10877,10 @@ blackbaudcdn.net
// Submitted by Luke Bratch <luke@bratch.co.uk>
of.je

// Blue Bite, LLC : https://bluebite.com
// Submitted by Joshua Weiss <admin.engineering@bluebite.com>
bluebite.io

// Boomla : https://boomla.com
// Submitted by Tibor Halter <thalter@boomla.com>
boomla.net
Expand Down Expand Up @@ -11133,11 +11145,6 @@ cupcake.is
// Submitted by Marvin Wiesner <Marvin@curv-labs.de>
curv.dev

// Curvegrid Inc. : https://www.curvegrid.com/
// Submitted by Pierre Rousset <security@curvegrid.com>
multibaas.app
multibaas.com

// Customer OCI - Oracle Dyn https://cloud.oracle.com/home https://dyn.com/dns/
// Submitted by Gregory Drake <support@dyn.com>
// Note: This is intended to also include customer-oci.com due to wildcards implicitly including the current label
Expand Down Expand Up @@ -11874,6 +11881,10 @@ id.forgerock.io
framer.app
framercanvas.com

// Frusky MEDIA&PR : https://www.frusky.de
// Submitted by Victor Pupynin <hallo@frusky.de>
*.frusky.de

// RavPage : https://www.ravpage.co.il
// Submitted by Roni Horowitz <roni@responder.co.il>
ravpage.co.il
Expand Down Expand Up @@ -11941,7 +11952,6 @@ gsj.bz
// GitHub, Inc.
// Submitted by Patrick Toomey <security@github.com>
githubusercontent.com
github.dev
githubpreview.dev
github.io

Expand Down Expand Up @@ -12351,6 +12361,10 @@ myjino.ru
*.spectrum.myjino.ru
*.vps.myjino.ru

// Jotelulu S.L. : https://jotelulu.com
// Submitted by Daniel Fariña <ingenieria@jotelulu.com>
jotelulu.cloud

// Joyent : https://www.joyent.com/
// Submitted by Brian Bennett <brian.bennett@joyent.com>
*.triton.zone
Expand Down Expand Up @@ -13018,6 +13032,13 @@ dyn53.io
// Submitted by Zulfais <pc@co.bn>
co.bn

// Postman, Inc : https://postman.com
// Submitted by Rahul Dhawan <security@postman.com>
postman-echo.com
pstmn.io
mock.pstmn.io
httpbin.org

// prgmr.com : https://prgmr.com/
// Submitted by Sarah Newman <owner@prgmr.com>
xen.prgmr.com
Expand Down Expand Up @@ -13148,6 +13169,10 @@ hzc.io
wellbeingzone.eu
wellbeingzone.co.uk

// Rico Developments Limited : https://adimo.co
// Submitted by Colin Brown <hello@adimo.co>
adimo.co.uk

// Rochester Institute of Technology : http://www.rit.edu/
// Submitted by Jennifer Herting <jchits@rit.edu>
git-pages.rit.edu
Expand Down Expand Up @@ -13208,6 +13233,10 @@ seidat.net
// Submitted by Felix Mönckemeyer <f.moenckemeyer@senseering.de>
senseering.net

// Sendmsg: https://www.sendmsg.co.il
// Submitted by Assaf Stern <domains@comstar.co.il>
minisite.ms

// Service Magnet : https://myservicemagnet.com
// Submitted by Dave Sanders <dave@myservicemagnet.com>
magnet.page
Expand Down Expand Up @@ -13281,6 +13310,10 @@ srht.site
// Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io>
stackhero-network.com

// Staclar : https://staclar.com
// Submitted by Matthias Merkel <matthias.merkel@staclar.com>
novecore.site

// staticland : https://static.land
// Submitted by Seth Vincent <sethvincent@gmail.com>
static.land
Expand Down
45 changes: 39 additions & 6 deletions src/tld/res/effective_tld_names_public_only.dat.txt
Expand Up @@ -10800,6 +10800,10 @@ apigee.io
appspacehosted.com
appspaceusercontent.com

// Appudo UG (haftungsbeschränkt) : https://www.appudo.com
// Submitted by Alexander Hochbaum <admin@appudo.com>
appudo.net

// Aptible : https://www.aptible.com/
// Submitted by Thomas Orozco <thomas@aptible.com>
on-aptible.com
Expand Down Expand Up @@ -10829,6 +10833,10 @@ myasustor.com
// Submitted by Andreas Weise <a.weise@avm.de>
myfritz.net

// AVStack Pte. Ltd. : https://avstack.io
// Submitted by Jasper Hugo <jasper@avstack.io>
onavstack.net

// AW AdvisorWebsites.com Software Inc : https://advisorwebsites.com
// Submitted by James Kennedy <domains@advisorwebsites.com>
*.awdev.ca
Expand Down Expand Up @@ -10869,6 +10877,10 @@ blackbaudcdn.net
// Submitted by Luke Bratch <luke@bratch.co.uk>
of.je

// Blue Bite, LLC : https://bluebite.com
// Submitted by Joshua Weiss <admin.engineering@bluebite.com>
bluebite.io

// Boomla : https://boomla.com
// Submitted by Tibor Halter <thalter@boomla.com>
boomla.net
Expand Down Expand Up @@ -11133,11 +11145,6 @@ cupcake.is
// Submitted by Marvin Wiesner <Marvin@curv-labs.de>
curv.dev

// Curvegrid Inc. : https://www.curvegrid.com/
// Submitted by Pierre Rousset <security@curvegrid.com>
multibaas.app
multibaas.com

// Customer OCI - Oracle Dyn https://cloud.oracle.com/home https://dyn.com/dns/
// Submitted by Gregory Drake <support@dyn.com>
// Note: This is intended to also include customer-oci.com due to wildcards implicitly including the current label
Expand Down Expand Up @@ -11874,6 +11881,10 @@ id.forgerock.io
framer.app
framercanvas.com

// Frusky MEDIA&PR : https://www.frusky.de
// Submitted by Victor Pupynin <hallo@frusky.de>
*.frusky.de

// RavPage : https://www.ravpage.co.il
// Submitted by Roni Horowitz <roni@responder.co.il>
ravpage.co.il
Expand Down Expand Up @@ -11941,7 +11952,6 @@ gsj.bz
// GitHub, Inc.
// Submitted by Patrick Toomey <security@github.com>
githubusercontent.com
github.dev
githubpreview.dev
github.io

Expand Down Expand Up @@ -12351,6 +12361,10 @@ myjino.ru
*.spectrum.myjino.ru
*.vps.myjino.ru

// Jotelulu S.L. : https://jotelulu.com
// Submitted by Daniel Fariña <ingenieria@jotelulu.com>
jotelulu.cloud

// Joyent : https://www.joyent.com/
// Submitted by Brian Bennett <brian.bennett@joyent.com>
*.triton.zone
Expand Down Expand Up @@ -13018,6 +13032,13 @@ dyn53.io
// Submitted by Zulfais <pc@co.bn>
co.bn

// Postman, Inc : https://postman.com
// Submitted by Rahul Dhawan <security@postman.com>
postman-echo.com
pstmn.io
mock.pstmn.io
httpbin.org

// prgmr.com : https://prgmr.com/
// Submitted by Sarah Newman <owner@prgmr.com>
xen.prgmr.com
Expand Down Expand Up @@ -13148,6 +13169,10 @@ hzc.io
wellbeingzone.eu
wellbeingzone.co.uk

// Rico Developments Limited : https://adimo.co
// Submitted by Colin Brown <hello@adimo.co>
adimo.co.uk

// Rochester Institute of Technology : http://www.rit.edu/
// Submitted by Jennifer Herting <jchits@rit.edu>
git-pages.rit.edu
Expand Down Expand Up @@ -13208,6 +13233,10 @@ seidat.net
// Submitted by Felix Mönckemeyer <f.moenckemeyer@senseering.de>
senseering.net

// Sendmsg: https://www.sendmsg.co.il
// Submitted by Assaf Stern <domains@comstar.co.il>
minisite.ms

// Service Magnet : https://myservicemagnet.com
// Submitted by Dave Sanders <dave@myservicemagnet.com>
magnet.page
Expand Down Expand Up @@ -13281,6 +13310,10 @@ srht.site
// Submitted by Adrien Gillon <adrien+public-suffix-list@stackhero.io>
stackhero-network.com

// Staclar : https://staclar.com
// Submitted by Matthias Merkel <matthias.merkel@staclar.com>
novecore.site

// staticland : https://static.land
// Submitted by Seth Vincent <sethvincent@gmail.com>
static.land
Expand Down
2 changes: 1 addition & 1 deletion src/tld/tests/__init__.py
Expand Up @@ -4,5 +4,5 @@
from .test_commands import *


if __name__ == '__main__':
if __name__ == "__main__":
unittest.main()
28 changes: 14 additions & 14 deletions src/tld/tests/base.py
Expand Up @@ -4,12 +4,12 @@
import logging
import socket

__author__ = 'Artur Barseghyan'
__copyright__ = '2013-2020 Artur Barseghyan'
__license__ = 'MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later'
__author__ = "Artur Barseghyan"
__copyright__ = "2013-2021 Artur Barseghyan"
__license__ = "MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later"
__all__ = (
'internet_available_only',
'log_info',
"internet_available_only",
"log_info",
)

LOG_INFO = True
Expand All @@ -25,16 +25,17 @@ def inner(self, *args, **kwargs):
"""Inner."""
result = func(self, *args, **kwargs)

LOGGER.debug('\n\n%s', func.__name__)
LOGGER.debug('============================')
LOGGER.debug("\n\n%s", func.__name__)
LOGGER.debug("============================")
if func.__doc__:
LOGGER.debug('""" %s """', func.__doc__.strip())
LOGGER.debug('----------------------------')
LOGGER.debug("----------------------------")
if result is not None:
LOGGER.debug(result)
LOGGER.debug('\n++++++++++++++++++++++++++++')
LOGGER.debug("\n++++++++++++++++++++++++++++")

return result

return inner


Expand All @@ -56,17 +57,16 @@ def is_internet_available(host="8.8.8.8", port=53, timeout=3):


def internet_available_only(func):

def inner(self, *args, **kwargs):
"""Inner."""
if not is_internet_available():
LOGGER.debug('\n\n%s', func.__name__)
LOGGER.debug('============================')
LOGGER.debug("\n\n%s", func.__name__)
LOGGER.debug("============================")
if func.__doc__:
LOGGER.debug('""" %s """', func.__doc__.strip())
LOGGER.debug('----------------------------')
LOGGER.debug("----------------------------")
LOGGER.debug("Skipping because no Internet connection available.")
LOGGER.debug('\n++++++++++++++++++++++++++++')
LOGGER.debug("\n++++++++++++++++++++++++++++")
return None

result = func(self, *args, **kwargs)
Expand Down

0 comments on commit c721fee

Please sign in to comment.