Skip to content

Commit 826d1bc

Browse files
SONARPY-945 Add custom stubs in typeshed serializer
1 parent a0a673a commit 826d1bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+341
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from SonarPythonAnalyzerFakeStub import CustomStubBase
2+
3+
from typing import Any
4+
5+
VERIFY_NONE: int
6+
7+
class Context(CustomStubBase):
8+
def set_verify(self, *args, **kwargs) -> None: ...
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import OpenSSL.SSL as SSL
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class CustomStubBase: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import cryptography.hazmat.primitives.asymmetric.padding as padding
2+
import cryptography.hazmat.primitives.asymmetric.rsa as rsa
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from SonarPythonAnalyzerFakeStub import CustomStubBase
2+
3+
class PKCS1v15(CustomStubBase): ...
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from SonarPythonAnalyzerFakeStub import CustomStubBase
2+
3+
from typing import Any
4+
5+
class RSAPublicKey(CustomStubBase):
6+
def encrypt(self, *args, **kwargs) -> Any: ...
7+
8+
class RSAPrivateKey(CustomStubBase):
9+
def decrypt(self, *args, **kwargs) -> Any: ...
10+
def public_key(self, *args, **kwargs) -> RSAPublicKey: ...
11+
12+
def generate_private_key(self, *args, **kwargs) -> RSAPrivateKey: ...
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import cryptography.hazmat.primitives.ciphers.modes as modes
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from SonarPythonAnalyzerFakeStub import CustomStubBase
2+
3+
class CBC(CustomStubBase): ...
4+
class ECB(CustomStubBase): ...
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import xml.etree.ElementTree as ElementTree
2+
import lxml.etree as lxml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import django.http as http
2+
import django.db as db
3+
import django.utils as utils
4+
import django.urls as urls
5+
import django.conf as conf

0 commit comments

Comments
 (0)