Browse Source

IPv4.py: Lambda assignment violates Pep 8

Stefan Schmidt 6 years ago
parent
commit
03cdfc99c6
1 changed files with 2 additions and 1 deletions
  1. 2 1
      code/ID2TLib/IPv4.py

+ 2 - 1
code/ID2TLib/IPv4.py

@@ -200,7 +200,8 @@ class IPAddressBlock:
         return IPAddress.from_int(self.ipnum + self.block_size() - 1)
 
     def _bitmask(self, netmask: int) -> int:
-        ones = lambda x: (1 << x) - 1
+        def ones(x: int) -> int:
+            return (1 << x) - 1
 
         return ones(32) ^ ones(32 - netmask)