inpsPyPI 1.0.6__tar.gz → 1.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: inpsPyPI
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: PyPI package designed to make development in Python easier.
5
5
  Project-URL: Homepage, https://github.com/isaiahnoelpulidosalazar/inpsPyPI
6
6
  Author-email: Isaiah Noel Pulido Salazar <isaiahnoelpulidosalazar@gmail.com>
@@ -25,4 +25,4 @@ __all__ = [
25
25
  # python -m unittest -b test_all.py
26
26
 
27
27
  # changes:
28
- # - update __init__
28
+ # - change cls to self in Check.Email
@@ -12,27 +12,27 @@ class Check:
12
12
  _should_use_full_domain = False
13
13
 
14
14
  @classmethod
15
- def add_valid_domain_name(cls, string: str):
16
- cls.valid_domain_names.append(string)
15
+ def add_valid_domain_name(self, string: str):
16
+ self.valid_domain_names.append(string)
17
17
 
18
18
  @classmethod
19
- def add_valid_domain_extension(cls, string: str):
20
- cls.valid_domain_extensions.append(string)
19
+ def add_valid_domain_extension(self, string: str):
20
+ self.valid_domain_extensions.append(string)
21
21
 
22
22
  @classmethod
23
- def add_valid_domain(cls, string: str):
24
- cls.valid_domains.append(string)
23
+ def add_valid_domain(self, string: str):
24
+ self.valid_domains.append(string)
25
25
 
26
26
  @classmethod
27
- def should_use_full_domain(cls, boolean: bool = True):
28
- cls._should_use_full_domain = boolean
27
+ def should_use_full_domain(self, boolean: bool = True):
28
+ self._should_use_full_domain = boolean
29
29
 
30
30
  @classmethod
31
- def is_valid(cls, string: str) -> bool:
32
- if cls._should_use_full_domain:
31
+ def is_valid(self, string: str) -> bool:
32
+ if self._should_use_full_domain:
33
33
  try:
34
34
  domain = string.split('@')
35
- return domain[1] in cls.valid_domains
35
+ return domain[1] in self.valid_domains
36
36
  except Exception:
37
37
  return False
38
38
  else:
@@ -41,8 +41,8 @@ class Check:
41
41
  domain_parts = domain[1].split('.')
42
42
  domain_name = domain_parts[0]
43
43
  domain_extension = domain_parts[1]
44
- return (domain_name in cls.valid_domain_names and
45
- domain_extension in cls.valid_domain_extensions)
44
+ return (domain_name in self.valid_domain_names and
45
+ domain_extension in self.valid_domain_extensions)
46
46
  except Exception:
47
47
  return False
48
48
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "inpsPyPI"
7
- version = "1.0.6"
7
+ version = "1.0.7"
8
8
  description = "PyPI package designed to make development in Python easier."
9
9
  readme = "README.md"
10
10
  authors = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes