Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove nim unused imports #12783

Merged
merged 1 commit into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/app/modules/main/activity_center/controller.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, stint
import stint
import ./io_interface

import ../../../global/app_signals
Expand All @@ -7,7 +7,6 @@ import ../../../../app_service/service/activity_center/service as activity_cente
import ../../../../app_service/service/contacts/service as contacts_service
import ../../../../app_service/service/message/service as message_service
import ../../../../app_service/service/community/service as community_service
import ../../../../app_service/service/eth/utils as eth_utils
import ../../../../app_service/service/chat/service as chat_service

type
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/activity_center/io_interface.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, stint
import Tables
import ./item
import ../../../../app_service/service/activity_center/service as activity_center_service

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/activity_center/item.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import strformat, stint
import strformat
import ../../shared_models/message_item_qobject
import ../../../../app_service/service/activity_center/dto/notification
import ../../../../app_service/service/chat/dto/chat
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/activity_center/model.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, Tables, chronicles, json, sequtils, strformat, strutils
import NimQml, Tables, json, sequtils, strutils
import ./item

type
Expand Down
4 changes: 1 addition & 3 deletions src/app/modules/main/activity_center/module.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, Tables, json, stint, sugar, sequtils
import NimQml, Tables, json, stint, sequtils

import ./io_interface, ./view, ./controller
import ../io_interface as delegate_interface
Expand All @@ -14,8 +14,6 @@ import ../../../../app_service/service/message/service as message_service
import ../../../../app_service/service/chat/service as chat_service
import ../../../../app_service/service/community/service as community_service

import ../../../global/app_sections_config as conf

export io_interface

type
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/activity_center/view.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, json, strutils, json_serialization, sequtils, strformat, std/tables
import NimQml, json, strutils, sequtils, strformat, std/tables
import ../../../../app_service/service/activity_center/service as activity_center_service

import ./model
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/app_search/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io_interface
import ../io_interface as delegate_interface
import view, controller
import location_menu_model, location_menu_item
import location_menu_sub_model, location_menu_sub_item
import location_menu_sub_item
import result_model, result_item
import ../../shared_models/message_item

Expand Down
4 changes: 2 additions & 2 deletions src/app/modules/main/browser_section/dapps/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import controller
import ../../../../global/global_singleton
import ../../../../../app_service/service/dapp_permissions/service as dapp_permissions_service
import ../../../../../app_service/service/wallet_account/service as wallet_account_service
import options

export io_interface

type
Expand Down Expand Up @@ -108,4 +108,4 @@ method disconnectAddress*(self: Module, dapp: string, address: string) =

method disconnect*(self: Module, dapp: string) =
self.controller.disconnect(dapp)
self.fetchDapps()
self.fetchDapps()
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import chronicles, uuids, times
import io_interface
import json

import ../../../../../../app/global/global_singleton
import ../../../../../../app_service/service/contacts/service as contact_service
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/chat_section/controller.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, sugar, sequtils, strutils
import Tables

import io_interface

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/chat_section/model.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, Tables, strutils, strformat, json, sequtils, algorithm
import NimQml, Tables, strutils, strformat, json, sequtils
import ../../../../app_service/common/types
import ../../../../app_service/service/chat/dto/chat
from ../../../../app_service/service/contacts/dto/contacts import TrustStatus
Expand Down
2 changes: 0 additions & 2 deletions src/app/modules/main/chat_section/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import ../../shared_models/token_criteria_model
import ../../shared_models/token_permission_chat_list_model

import chat_content/module as chat_content_module
import chat_content/users/module as users_module

import ../../../global/app_sections_config as conf
import ../../../global/global_singleton
import ../../../core/eventemitter
import ../../../core/unique_event_emitter
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/main/communities/controller.nim
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import app_service/service/token/service as token_service
import app_service/service/wallet_account/service as wallet_account_service
import app_service/service/keycard/service as keycard_service
import app_service/common/types
import backend/collectibles as backend_collectibles
import app/modules/shared_modules/keycard_popup/io_interface as keycard_shared_module

const UNIQUE_COMMUNITIES_MODULE_AUTH_IDENTIFIER* = "CommunitiesModule-Authentication"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import NimQml, Tables
import curated_community_item
import ../../../shared_models/[token_permissions_model, token_permission_item]
import ../../../shared_models/token_permission_item

type
ModelRole {.pure.} = enum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import ../../../../../../app_service/service/community_tokens/dto/community_toke
import ../../../../../../app_service/service/community_tokens/community_collectible_owner
import ../../../../../../app_service/service/network/dto
import ../../../../../../app_service/common/types
from backend/collectibles_types import CollectibleOwner

import token_owners_model
import token_owners_item
Expand Down
4 changes: 1 addition & 3 deletions src/app/modules/main/communities/tokens/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import ../../../../../app_service/service/network/service as networks_service
import ../../../../../app_service/service/community/service as community_service
import ../../../../../app_service/service/community/dto/community
import ../../../../../app_service/service/accounts/utils as utl
import ../../../../../app_service/common/conversion
import ../../../../../app_service/common/types
import ../../../../../app_service/common/utils as common_utils
import ../../../../core/eventemitter
import ../../../../global/global_singleton
import ../../../shared_models/currency_amount
Expand Down Expand Up @@ -374,4 +372,4 @@ method onOwnerTokenOwnerAddress*(self: Module, chainId: int, contractAddress: st
"chainId": chainId,
"contractAddress": contractAddress
}
self.view.setOwnerTokenDetails($jsonObj)
self.view.setOwnerTokenDetails($jsonObj)
2 changes: 1 addition & 1 deletion src/app/modules/main/controller.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import chronicles, stint, tables
import chronicles, stint
import app/global/app_sections_config as conf
import app/global/global_singleton
import app/global/app_signals
Expand Down
2 changes: 0 additions & 2 deletions src/app/modules/main/network_connection/controller.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import NimQml

import ./io_interface
import ../../../core/eventemitter
import ../../../../app_service/service/network_connection/service as network_connection_service
Expand Down
2 changes: 0 additions & 2 deletions src/app/modules/main/network_connection/io_interface.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import NimQml

type
AccessInterface* {.pure inheritable.} = ref object of RootObj
## Abstract class for any input/interaction with this module.
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/main/node_section/io_interface.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import ../../../core/signals/types

type
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/node_section/module.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, Tables, json
import NimQml

import io_interface
import ../io_interface as delegate_interface
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/node_section/view.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, chronicles, json, strutils
import NimQml, json, strutils
import io_interface
import ../../../core/signals/types

Expand Down
5 changes: 2 additions & 3 deletions src/app/modules/main/profile_section/advanced/module.nim
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import NimQml, chronicles, uuids
import NimQml, chronicles
import io_interface
import ../io_interface as delegate_interface
import view, controller

import ../../../../../constants
import ../../../../core/eventemitter
import ../../../../global/global_singleton
import ../../../../../app_service/service/settings/service as settings_service
import ../../../../../app_service/service/stickers/service as stickers_service
import ../../../../../app_service/service/node_configuration/service as node_configuration_service
Expand Down Expand Up @@ -147,4 +146,4 @@ method setMaxLogBackups*(self: Module, value: int) =
self.controller.setMaxLogBackups(value)

method onLogMaxBackupsChanged*(self: Module) =
self.view.logMaxBackupsChanged()
self.view.logMaxBackupsChanged()
3 changes: 1 addition & 2 deletions src/app/modules/main/profile_section/communities/module.nim
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import NimQml, chronicles
import NimQml

import ./io_interface, ./view, ./controller
import ../io_interface as delegate_interface

import ../../../../core/eventemitter
import ../../../../../app_service/service/community/service as community_service

export io_interface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, chronicles
import chronicles
import io_interface

import app/core/eventemitter
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/profile_section/devices/model.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, Tables, sequtils, chronicles
import NimQml, Tables, sequtils
import item
import ../../../../../app_service/service/devices/dto/[installation]

Expand Down
1 change: 0 additions & 1 deletion src/app/modules/main/profile_section/devices/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import NimQml, tables, strutils, chronicles
import io_interface
import ../io_interface as delegate_interface
import view, controller, model, item
import logging

import app/global/global_singleton
import app/core/eventemitter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, chronicles, json
import chronicles, json
import io_interface

import ../../../../global/global_singleton
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/main/profile_section/keycard/module.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, chronicles, json, marshal, sequtils, sugar, strutils
import NimQml, chronicles, sequtils, sugar, strutils

import ./io_interface, ./view, ./controller
import ../io_interface as delegate_interface
Expand Down
3 changes: 1 addition & 2 deletions src/app/modules/main/profile_section/language/module.nim
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import NimQml, tables, sequtils, sugar, chronicles
import NimQml, tables, chronicles

import io_interface, view, controller, item, model, locale_table
import ../io_interface as delegate_interface
import ../../../../global/global_singleton
import ../../../../../app/core/eventemitter

import ../../../../../app_service/service/language/service as language_service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import NimQml
import ../../../../global/app_signals
from ../../../../../app_service/service/community/dto/community import CommunityDto
from ../../../../../app_service/service/chat/dto/chat import ChatDto

Expand Down Expand Up @@ -44,4 +43,4 @@ method addChat*(self: AccessInterface, itemId: string) {.base.} =
raise newException(ValueError, "No implementation available")

method setName*(self: AccessInterface, itemId: string, name: string) {.base.} =
raise newException(ValueError, "No implementation available")
raise newException(ValueError, "No implementation available")
5 changes: 2 additions & 3 deletions src/app/modules/main/profile_section/notifications/module.nim
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import NimQml, algorithm, json, chronicles
import NimQml, algorithm, chronicles
import io_interface
import ../io_interface as delegate_interface
import view, controller, model, item

import ../../../../global/app_signals
import ../../../../global/global_singleton
import ../../../../core/eventemitter
import ../../../../../app_service/service/settings/service as settings_service
Expand Down Expand Up @@ -146,4 +145,4 @@ method addChat*(self: Module, itemId: string) =
self.addChat(chatDto)

method setName*(self: Module, itemId: string, name: string) =
self.view.exemptionsModel().updateName(itemId, name)
self.view.exemptionsModel().updateName(itemId, name)
2 changes: 0 additions & 2 deletions src/app/modules/main/profile_section/profile/controller.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import json, sugar, sequtils

import io_interface

import app/core/eventemitter
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/main/profile_section/profile/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import app_service/service/community/service as community_service
import app_service/service/wallet_account/service as wallet_account_service
import app_service/service/profile/dto/profile_showcase
import app_service/service/profile/dto/profile_showcase_preferences
import app_service/common/types
import app_service/common/social_links

import app/modules/shared_models/social_links_model
Expand Down
5 changes: 2 additions & 3 deletions src/app/modules/main/profile_section/waku/controller.nim
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Tables, chronicles
import chronicles
import io_interface

import ../../../../core/eventemitter
import ../../../../core/fleets/fleet_configuration
import ../../../../../app_service/service/settings/service as settings_service
import ../../../../../app_service/service/node_configuration/service as node_configuration_service

Expand Down Expand Up @@ -36,4 +35,4 @@ proc getAllWakuNodes*(self: Controller): seq[string] =
return self.nodeConfigurationService.getAllWakuNodes()

proc saveNewWakuNode*(self: Controller, nodeAddress: string) =
self.nodeConfigurationService.saveNewWakuNode(nodeAddress)
self.nodeConfigurationService.saveNewWakuNode(nodeAddress)
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import io_interface
import app_service/service/wallet_account/service as wallet_account_service
import app_service/service/currency/dto
import app/modules/shared_modules/keycard_popup/io_interface as keycard_shared_module

type
Controller* = ref object of RootObj
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, sequtils, sugar, chronicles, tables
import NimQml, sequtils, sugar, tables

import ./io_interface, ./view
import ./controller as accountsc
Expand All @@ -9,7 +9,6 @@ import app/modules/shared_models/[keypair_model, currency_amount]
import app/modules/shared_modules/collectibles/controller as collectiblesc
import app/global/global_singleton
import app/core/eventemitter
import app_service/service/keycard/service as keycard_service
import app_service/service/wallet_account/service as wallet_account_service
import app_service/service/network/service as network_service
import app_service/service/settings/service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, sequtils, strutils, sugar
import NimQml, sequtils, strutils

import ./io_interface
import ./model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, NimQml
import NimQml
import ../io_interface as delegate_interface
import io_interface, view, controller, combined_item, item
import ../../../../../core/eventemitter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Tables, NimQml, sequtils, sugar
import NimQml, sequtils

import ./io_interface
import ./item
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/main/shared_urls/controller.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import stint
import ./io_interface

import ../../../core/signals/types
Expand Down
4 changes: 1 addition & 3 deletions src/app/modules/main/shared_urls/io_interface.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import NimQml, stint

import ../../../../app_service/service/shared_urls/service as urls_service

type
Expand Down Expand Up @@ -29,4 +27,4 @@ method parseSharedUrl*(self: AccessInterface, url: string): UrlDataDto {.base.}
# This way (using concepts) is used only for the modules managed by AppController
type
DelegateInterface* = concept c
c.mainDidLoad()
c.mainDidLoad()
4 changes: 2 additions & 2 deletions src/app/modules/main/shared_urls/module.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import NimQml, sequtils, stint, json
import NimQml

import io_interface, view, controller
import ../io_interface as delegate_interface
Expand Down Expand Up @@ -62,4 +62,4 @@ method parseCommunityChannelSharedUrl*(self: Module, url: string): string =

method parseContactSharedUrl*(self: Module, url: string): string =
let contactData = self.controller.parseContactSharedUrl(url)
return $contactData
return $contactData
1 change: 0 additions & 1 deletion src/app/modules/main/stickers/controller.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Tables, stint, json
import ./io_interface

import ../../../core/eventemitter
import ../../../../app_service/service/node/service as node_service
import ../../../../app_service/service/stickers/service as stickers_service
import ../../../../app_service/service/token/service
import ../../../../app_service/service/settings/service as settings_service
Expand Down
Loading