-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pre-commit-ci-update-config
- Loading branch information
Showing
89 changed files
with
1,142 additions
and
786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,56 @@ | ||
from typing_extensions import TypedDict | ||
from dataclasses import dataclass | ||
|
||
|
||
class StateList(TypedDict): | ||
@dataclass | ||
class GstState: | ||
name: str | ||
short_code: int | ||
short_code_text: str | ||
title: str | ||
code: int | ||
|
||
|
||
indian_states: list[StateList] = [ | ||
{'short_code': 1, 'name': 'Jammu and Kashmir', 'short_code_text': 'JK'}, | ||
{'short_code': 2, 'name': 'Himachal Pradesh', 'short_code_text': 'HP'}, | ||
{'short_code': 3, 'name': 'Punjab', 'short_code_text': 'PB'}, | ||
{'short_code': 4, 'name': 'Chandigarh', 'short_code_text': 'CH'}, | ||
{'short_code': 5, 'name': 'Uttarakhand', 'short_code_text': 'UT'}, | ||
{'short_code': 6, 'name': 'Haryana', 'short_code_text': 'HR'}, | ||
{'short_code': 7, 'name': 'Delhi', 'short_code_text': 'DL'}, | ||
{'short_code': 8, 'name': 'Rajasthan', 'short_code_text': 'RJ'}, | ||
{'short_code': 9, 'name': 'Uttar Pradesh', 'short_code_text': 'UP'}, | ||
{'short_code': 10, 'name': 'Bihar', 'short_code_text': 'BR'}, | ||
{'short_code': 11, 'name': 'Sikkim', 'short_code_text': 'SK'}, | ||
{'short_code': 12, 'name': 'Arunachal Pradesh', 'short_code_text': 'AR'}, | ||
{'short_code': 13, 'name': 'Nagaland', 'short_code_text': 'NL'}, | ||
{'short_code': 14, 'name': 'Manipur', 'short_code_text': 'MN'}, | ||
{'short_code': 15, 'name': 'Mizoram', 'short_code_text': 'MZ'}, | ||
{'short_code': 16, 'name': 'Tripura', 'short_code_text': 'TR'}, | ||
{'short_code': 17, 'name': 'Meghalaya', 'short_code_text': 'ML'}, | ||
{'short_code': 18, 'name': 'Assam', 'short_code_text': 'AS'}, | ||
{'short_code': 19, 'name': 'West Bengal', 'short_code_text': 'WB'}, | ||
{'short_code': 20, 'name': 'Jharkhand', 'short_code_text': 'JH'}, | ||
{'short_code': 21, 'name': 'Odisha', 'short_code_text': 'OR'}, | ||
{'short_code': 22, 'name': 'Chhattisgarh', 'short_code_text': 'CT'}, | ||
{'short_code': 23, 'name': 'Madhya Pradesh', 'short_code_text': 'MP'}, | ||
{'short_code': 24, 'name': 'Gujarat', 'short_code_text': 'GJ'}, | ||
{'short_code': 25, 'name': 'Daman and Diu', 'short_code_text': 'DD'}, | ||
{'short_code': 26, 'name': 'Dadra and Nagar Haveli', 'short_code_text': 'DN'}, | ||
{'short_code': 27, 'name': 'Maharashtra', 'short_code_text': 'MH'}, | ||
{'short_code': 28, 'name': 'Andhra Pradesh (old)', 'short_code_text': 'AP'}, | ||
{'short_code': 29, 'name': 'Karnataka', 'short_code_text': 'KA'}, | ||
{'short_code': 30, 'name': 'Goa', 'short_code_text': 'GA'}, | ||
{'short_code': 31, 'name': 'Lakshadweep', 'short_code_text': 'LD'}, | ||
{'short_code': 32, 'name': 'Kerala', 'short_code_text': 'KL'}, | ||
{'short_code': 33, 'name': 'Tamil Nadu', 'short_code_text': 'TN'}, | ||
{'short_code': 34, 'name': 'Puducherry', 'short_code_text': 'PY'}, | ||
{'short_code': 35, 'name': 'Andaman and Nicobar Islands', 'short_code_text': 'AN'}, | ||
{'short_code': 36, 'name': 'Telangana', 'short_code_text': 'TG'}, | ||
{'short_code': 37, 'name': 'Andhra Pradesh', 'short_code_text': 'AD'}, | ||
indian_states: list[GstState] = [ | ||
GstState(code=1, name='JK', title='Jammu and Kashmir'), | ||
GstState(code=2, name='HP', title='Himachal Pradesh'), | ||
GstState(code=3, name='PB', title='Punjab'), | ||
GstState(code=4, name='CH', title='Chandigarh'), | ||
GstState(code=5, name='UT', title='Uttarakhand'), | ||
GstState(code=6, name='HR', title='Haryana'), | ||
GstState(code=7, name='DL', title='Delhi'), | ||
GstState(code=8, name='RJ', title='Rajasthan'), | ||
GstState(code=9, name='UP', title='Uttar Pradesh'), | ||
GstState(code=10, name='BR', title='Bihar'), | ||
GstState(code=11, name='SK', title='Sikkim'), | ||
GstState(code=12, name='AR', title='Arunachal Pradesh'), | ||
GstState(code=13, name='NL', title='Nagaland'), | ||
GstState(code=14, name='MN', title='Manipur'), | ||
GstState(code=15, name='MZ', title='Mizoram'), | ||
GstState(code=16, name='TR', title='Tripura'), | ||
GstState(code=17, name='ML', title='Meghalaya'), | ||
GstState(code=18, name='AS', title='Assam'), | ||
GstState(code=19, name='WB', title='West Bengal'), | ||
GstState(code=20, name='JH', title='Jharkhand'), | ||
GstState(code=21, name='OR', title='Odisha'), | ||
GstState(code=22, name='CG', title='Chattisgarh'), | ||
GstState(code=23, name='MP', title='Madhya Pradesh'), | ||
GstState(code=24, name='GJ', title='Gujarat'), | ||
GstState(code=25, name='DD', title='Daman and Diu (old)'), | ||
GstState(code=26, name='DN', title='Dadra, Nagar Haveli, Daman and Diu'), | ||
GstState(code=27, name='MH', title='Maharashtra'), | ||
GstState(code=28, name='AP', title='Andhra Pradesh (old)'), | ||
GstState(code=29, name='KA', title='Karnataka'), | ||
GstState(code=30, name='GA', title='Goa'), | ||
GstState(code=31, name='LD', title='Lakshadweep'), | ||
GstState(code=32, name='KL', title='Kerala'), | ||
GstState(code=33, name='TN', title='Tamil Nadu'), | ||
GstState(code=34, name='PY', title='Puducherry'), | ||
GstState(code=35, name='AN', title='Andaman and Nicobar Islands'), | ||
GstState(code=36, name='TG', title='Telangana'), | ||
GstState(code=37, name='AD', title='Andhra Pradesh'), | ||
GstState(code=38, name='LA', title='Ladakh'), | ||
] | ||
indian_states.sort(key=lambda s: (s.title, s.code) if s.code < 90 else ('ZZ', s.code)) | ||
|
||
indian_states_dict = {d["short_code_text"]: d for d in indian_states} | ||
|
||
short_codes = [state['short_code'] for state in indian_states] | ||
indian_states_dict = {state.name: state for state in indian_states} | ||
|
||
codes = [state.code for state in indian_states] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.