|
22 | 22 |
|
23 | 23 | import warnings
|
24 | 24 |
|
25 |
| -# pylint: disable=unused-import |
26 |
| -from airflow.providers.google.cloud.operators.vision import ( # noqa |
27 |
| - CloudVisionAddProductToProductSetOperator, CloudVisionAnnotateImageOperator, |
28 |
| - CloudVisionDetectDocumentTextOperator, CloudVisionDetectImageLabelsOperator, |
29 |
| - CloudVisionDetectImageSafeSearchOperator, CloudVisionDetectTextOperator, CloudVisionProductCreateOperator, |
30 |
| - CloudVisionProductDeleteOperator, CloudVisionProductGetOperator, CloudVisionProductSetCreateOperator, |
31 |
| - CloudVisionProductSetDeleteOperator, CloudVisionProductSetGetOperator, |
32 |
| - CloudVisionProductSetUpdateOperator, CloudVisionProductUpdateOperator, |
33 |
| - CloudVisionReferenceImageCreateOperator, CloudVisionRemoveProductFromProductSetOperator, |
| 25 | +from airflow.providers.google.cloud.operators.vision import ( # noqa # pylint: disable=unused-import |
| 26 | + CloudVisionAddProductToProductSetOperator, CloudVisionCreateProductOperator, |
| 27 | + CloudVisionCreateProductSetOperator, CloudVisionCreateReferenceImageOperator, |
| 28 | + CloudVisionDeleteProductOperator, CloudVisionDeleteProductSetOperator, |
| 29 | + CloudVisionDetectImageLabelsOperator, CloudVisionDetectImageSafeSearchOperator, |
| 30 | + CloudVisionDetectTextOperator, CloudVisionGetProductOperator, CloudVisionGetProductSetOperator, |
| 31 | + CloudVisionImageAnnotateOperator, CloudVisionRemoveProductFromProductSetOperator, |
| 32 | + CloudVisionTextDetectOperator, CloudVisionUpdateProductOperator, CloudVisionUpdateProductSetOperator, |
34 | 33 | )
|
35 | 34 |
|
36 | 35 | warnings.warn(
|
37 | 36 | "This module is deprecated. Please use `airflow.providers.google.cloud.operators.vision`.",
|
38 | 37 | DeprecationWarning, stacklevel=2
|
39 | 38 | )
|
| 39 | + |
| 40 | + |
| 41 | +class CloudVisionAnnotateImageOperator(CloudVisionImageAnnotateOperator): |
| 42 | + """ |
| 43 | + This class is deprecated. |
| 44 | + Please use `airflow.gcp.operators.vision.CloudVisionImageAnnotateOperator`. |
| 45 | + """ |
| 46 | + |
| 47 | + def __init__(self, *args, **kwargs): |
| 48 | + warnings.warn( |
| 49 | + """This class is deprecated. |
| 50 | + Please use `airflow.gcp.operators.vision.CloudVisionImageAnnotateOperator`.""", |
| 51 | + DeprecationWarning, stacklevel=2 |
| 52 | + ) |
| 53 | + super().__init__(*args, **kwargs) |
| 54 | + |
| 55 | + |
| 56 | +class CloudVisionDetectDocumentTextOperator(CloudVisionTextDetectOperator): |
| 57 | + """ |
| 58 | + This class is deprecated. |
| 59 | + Please use `airflow.gcp.operators.vision.CloudVisionTextDetectOperator`. |
| 60 | + """ |
| 61 | + |
| 62 | + def __init__(self, *args, **kwargs): |
| 63 | + warnings.warn( |
| 64 | + """This class is deprecated. |
| 65 | + Please use `airflow.gcp.operators.vision.CloudVisionTextDetectOperator`.""", |
| 66 | + DeprecationWarning, stacklevel=2 |
| 67 | + ) |
| 68 | + super().__init__(*args, **kwargs) |
| 69 | + |
| 70 | + |
| 71 | +class CloudVisionProductCreateOperator(CloudVisionCreateProductOperator): |
| 72 | + """ |
| 73 | + This class is deprecated. |
| 74 | + Please use `airflow.gcp.operators.vision.CloudVisionCreateProductOperator`. |
| 75 | + """ |
| 76 | + |
| 77 | + def __init__(self, *args, **kwargs): |
| 78 | + warnings.warn( |
| 79 | + """This class is deprecated. |
| 80 | + Please use `airflow.gcp.operators.vision.CloudVisionCreateProductOperator`.""", |
| 81 | + DeprecationWarning, stacklevel=2 |
| 82 | + ) |
| 83 | + super().__init__(*args, **kwargs) |
| 84 | + |
| 85 | + |
| 86 | +class CloudVisionProductDeleteOperator(CloudVisionDeleteProductOperator): |
| 87 | + """ |
| 88 | + This class is deprecated. |
| 89 | + Please use `airflow.gcp.operators.vision.CloudVisionDeleteProductOperator`. |
| 90 | + """ |
| 91 | + |
| 92 | + def __init__(self, *args, **kwargs): |
| 93 | + warnings.warn( |
| 94 | + """This class is deprecated. |
| 95 | + Please use `airflow.gcp.operators.vision.CloudVisionDeleteProductOperator`.""", |
| 96 | + DeprecationWarning, stacklevel=2 |
| 97 | + ) |
| 98 | + super().__init__(*args, **kwargs) |
| 99 | + |
| 100 | + |
| 101 | +class CloudVisionProductGetOperator(CloudVisionGetProductOperator): |
| 102 | + """ |
| 103 | + This class is deprecated. |
| 104 | + Please use `airflow.gcp.operators.vision.CloudVisionGetProductOperator`. |
| 105 | + """ |
| 106 | + |
| 107 | + def __init__(self, *args, **kwargs): |
| 108 | + warnings.warn( |
| 109 | + """This class is deprecated. |
| 110 | + Please use `airflow.gcp.operators.vision.CloudVisionGetProductOperator`.""", |
| 111 | + DeprecationWarning, stacklevel=2 |
| 112 | + ) |
| 113 | + super().__init__(*args, **kwargs) |
| 114 | + |
| 115 | + |
| 116 | +class CloudVisionProductSetCreateOperator(CloudVisionCreateProductSetOperator): |
| 117 | + """ |
| 118 | + This class is deprecated. |
| 119 | + Please use `airflow.gcp.operators.vision.CloudVisionCreateProductSetOperator`. |
| 120 | + """ |
| 121 | + |
| 122 | + def __init__(self, *args, **kwargs): |
| 123 | + warnings.warn( |
| 124 | + """This class is deprecated. |
| 125 | + Please use `airflow.gcp.operators.vision.CloudVisionCreateProductSetOperator`.""", |
| 126 | + DeprecationWarning, stacklevel=2 |
| 127 | + ) |
| 128 | + super().__init__(*args, **kwargs) |
| 129 | + |
| 130 | + |
| 131 | +class CloudVisionProductSetDeleteOperator(CloudVisionDeleteProductSetOperator): |
| 132 | + """ |
| 133 | + This class is deprecated. |
| 134 | + Please use `airflow.gcp.operators.vision.CloudVisionDeleteProductSetOperator`. |
| 135 | + """ |
| 136 | + |
| 137 | + def __init__(self, *args, **kwargs): |
| 138 | + warnings.warn( |
| 139 | + """This class is deprecated. |
| 140 | + Please use `airflow.gcp.operators.vision.CloudVisionDeleteProductSetOperator`.""", |
| 141 | + DeprecationWarning, stacklevel=2 |
| 142 | + ) |
| 143 | + super().__init__(*args, **kwargs) |
| 144 | + |
| 145 | + |
| 146 | +class CloudVisionProductSetGetOperator(CloudVisionGetProductSetOperator): |
| 147 | + """ |
| 148 | + This class is deprecated. |
| 149 | + Please use `airflow.gcp.operators.vision.CloudVisionGetProductSetOperator`. |
| 150 | + """ |
| 151 | + |
| 152 | + def __init__(self, *args, **kwargs): |
| 153 | + warnings.warn( |
| 154 | + """This class is deprecated. |
| 155 | + Please use `airflow.gcp.operators.vision.CloudVisionGetProductSetOperator`.""", |
| 156 | + DeprecationWarning, stacklevel=2 |
| 157 | + ) |
| 158 | + super().__init__(*args, **kwargs) |
| 159 | + |
| 160 | + |
| 161 | +class CloudVisionProductSetUpdateOperator(CloudVisionUpdateProductSetOperator): |
| 162 | + """ |
| 163 | + This class is deprecated. |
| 164 | + Please use `airflow.gcp.operators.vision.CloudVisionUpdateProductSetOperator`. |
| 165 | + """ |
| 166 | + |
| 167 | + def __init__(self, *args, **kwargs): |
| 168 | + warnings.warn( |
| 169 | + """This class is deprecated. |
| 170 | + Please use `airflow.gcp.operators.vision.CloudVisionUpdateProductSetOperator`.""", |
| 171 | + DeprecationWarning, stacklevel=2 |
| 172 | + ) |
| 173 | + super().__init__(*args, **kwargs) |
| 174 | + |
| 175 | + |
| 176 | +class CloudVisionProductUpdateOperator(CloudVisionUpdateProductOperator): |
| 177 | + """ |
| 178 | + This class is deprecated. |
| 179 | + Please use `airflow.gcp.operators.vision.CloudVisionUpdateProductOperator`. |
| 180 | + """ |
| 181 | + |
| 182 | + def __init__(self, *args, **kwargs): |
| 183 | + warnings.warn( |
| 184 | + """This class is deprecated. |
| 185 | + Please use `airflow.gcp.operators.vision.CloudVisionUpdateProductOperator`.""", |
| 186 | + DeprecationWarning, stacklevel=2 |
| 187 | + ) |
| 188 | + super().__init__(*args, **kwargs) |
| 189 | + |
| 190 | + |
| 191 | +class CloudVisionReferenceImageCreateOperator(CloudVisionCreateReferenceImageOperator): |
| 192 | + """ |
| 193 | + This class is deprecated. |
| 194 | + Please use `airflow.gcp.operators.vision.CloudVisionCreateReferenceImageOperator`. |
| 195 | + """ |
| 196 | + |
| 197 | + def __init__(self, *args, **kwargs): |
| 198 | + warnings.warn( |
| 199 | + """This class is deprecated. |
| 200 | + Please use `airflow.gcp.operators.vision.CloudVisionCreateReferenceImageOperator`.""", |
| 201 | + DeprecationWarning, stacklevel=2 |
| 202 | + ) |
| 203 | + super().__init__(*args, **kwargs) |
0 commit comments